Compare commits

..

No commits in common. "0fa0918ada267e177274af61dd1875ef1b5a0a8e" and "fcd672a3b608825cd8df3e3e3d63bcdbec97dc00" have entirely different histories.

5 changed files with 51 additions and 90 deletions

View file

@ -31,10 +31,7 @@ outputs = {nixpkgs, lsfg-vk-flake, ...}: {
And then enable this in your system config:
```nix
services.lsfg-vk = {
enable = true;
ui.enable = true; # installs gui for configuring lsfg-vk
};
services.lsfg-vk.enable = true;
```
### User install (manual)

View file

@ -2,39 +2,56 @@
lib,
fetchFromGitHub,
cmake,
ninja,
vulkan-headers,
vulkan-loader,
llvmPackages,
libXrandr,
libXinerama,
libXcursor,
libXi,
libglvnd,
libxkbcommon,
wayland-scanner,
pkg-config,
wayland,
}:
llvmPackages.stdenv.mkDerivation {
pname = "lsfg-vk";
version = "0.9.0-2025-07-26-3c77bad";
version = "unstable-2025-07-24-c959c8f";
src = fetchFromGitHub {
owner = "PancakeTAS";
repo = "lsfg-vk";
rev = "3c77bad7941e2699a797b2741b64b8d907118bb6";
hash = "sha256-ZAtTzdSx81NK2ABSEIDOeYUgJDH4ROMApDSlg8U140k=";
rev = "c959c8f542e416a63d5436e47e1762e8c8074285";
hash = "sha256-/JS97I6OgzLAPzC1CbilQAx9B1T765aMa5Pr4dVyKzk=";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace VkLayer_LS_frame_generation.json \
--replace "liblsfg-vk.so" "$out/lib/liblsfg-vk.so"
'';
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
nativeBuildInputs = [
llvmPackages.clang-tools
llvmPackages.libllvm
llvmPackages.libllvm # needed for release builds
cmake
ninja
wayland-scanner
pkg-config
];
buildInputs = [
vulkan-headers
vulkan-loader
libXrandr
libXinerama
libXcursor
libXi
libglvnd
libxkbcommon
wayland
];
meta = with lib; {

View file

@ -6,11 +6,9 @@
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
in
{
packages = forAllSystems (system: {
default = nixpkgs.legacyPackages.${system}.callPackage ./lsfg-vk.nix { };
lsfg-vk = nixpkgs.legacyPackages.${system}.callPackage ./lsfg-vk.nix { };
lsfg-vk-ui = nixpkgs.legacyPackages.${system}.callPackage ./lsfg-vk-ui.nix { };
});
packages = forAllSystems (system:
{ default = nixpkgs.legacyPackages.${system}.callPackage ./default.nix { }; }
);
nixosModules.default = import ./module.nix;
};

View file

@ -1,47 +0,0 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
glib,
pango,
gdk-pixbuf,
gtk4,
libadwaita
}:
rustPlatform.buildRustPackage {
pname = "lsfg-vk-ui";
version = "0.9.0-2025-07-26-3c77bad";
src = fetchFromGitHub {
owner = "PancakeTAS";
repo = "lsfg-vk";
rev = "3c77bad7941e2699a797b2741b64b8d907118bb6";
hash = "sha256-ZAtTzdSx81NK2ABSEIDOeYUgJDH4ROMApDSlg8U140k=";
};
cargoHash = "sha256-1/3CTCXTqSfb/xtx/Q1whaHPeQ0fxu0Zg2sVJPxdcK0=";
sourceRoot = "source/ui";
nativeBuildInputs = [
pkg-config
glib
];
buildInputs = [
pango
gdk-pixbuf
gtk4
libadwaita
];
meta = with lib; {
description = "Graphical interface for lsfg-vk";
homepage = "https://github.com/PancakeTAS/lsfg-vk/";
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "lsfg-vk-ui";
};
}

View file

@ -6,23 +6,21 @@
}:
let
cfg = config.services.lsfg-vk;
lsfg-vk = pkgs.callPackage ./lsfg-vk.nix { };
lsfg-vk-ui = pkgs.callPackage ./lsfg-vk-ui.nix { };
lsfg-vk = pkgs.callPackage ./default.nix { };
in
{
options = {
services.lsfg-vk = {
enable = lib.mkEnableOption "Lossless Scaling Frame Generation Vulkan layer";
ui.enable = lib.mkEnableOption "Enables a GUI for configuring lsfg-vk";
package = lib.mkOption {
type = lib.types.package;
description = "The lsfg-vk package to use";
default = lsfg-vk;
};
losslessDLLFile = lib.mkOption {
losslessDLLFile = lib.mkOption
{
type = with lib.types; nullOr str;
default = null;
example = "/home/user/games/Lossless Scaling/Lossless.dll";
@ -32,7 +30,8 @@ in
'';
};
configFile = lib.mkOption {
configFile = lib.mkOption
{
type = with lib.types; nullOr str;
default = null;
example = "/home/user/.config/lsfg-vk/conf.toml";
@ -53,9 +52,6 @@ in
environment.etc."vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
"${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
}
(lib.mkIf cfg.ui.enable {
environment.systemPackages = [ lsfg-vk-ui ];
})
(lib.mkIf (cfg.losslessDLLFile != null) {
environment.sessionVariables.LSFG_DLL_PATH =
lib.warn "losslessDLLFile is deprecated and will only be used by lsfg-vk if LSFG_LEGACY is set."