mirror of
https://github.com/pabloaul/lsfg-vk-flake.git
synced 2025-08-27 10:56:29 -03:00
Compare commits
4 commits
0e4a10cb68
...
de8696f83f
Author | SHA1 | Date | |
---|---|---|---|
|
de8696f83f | ||
|
641212e569 | ||
|
291be68043 | ||
|
46745da846 |
3 changed files with 42 additions and 21 deletions
22
default.nix
22
default.nix
|
@ -1,14 +1,15 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, ninja
|
||||
, vulkan-headers
|
||||
, vulkan-loader
|
||||
, llvmPackages
|
||||
, spirv-headers
|
||||
}: let
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ninja,
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
llvmPackages,
|
||||
spirv-headers,
|
||||
}:
|
||||
|
||||
in llvmPackages.stdenv.mkDerivation {
|
||||
llvmPackages.stdenv.mkDerivation {
|
||||
pname = "lsfg-vk";
|
||||
version = "unstable-2025-07-14-83b869b";
|
||||
|
||||
|
@ -40,6 +41,7 @@ in llvmPackages.stdenv.mkDerivation {
|
|||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Vulkan layer for frame generation (Requires Lossless Scaling install)";
|
||||
homepage = "https://github.com/PancakeTAS/lsfg-vk/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
|
|
16
flake.nix
16
flake.nix
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { nixpkgs, ... }: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
packages.${system}.default = pkgs.callPackage ./default.nix {};
|
||||
nixosModules.default = import ./module.nix;
|
||||
};
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
packages.${system}.default = pkgs.callPackage ./default.nix { };
|
||||
nixosModules.default = import ./module.nix;
|
||||
};
|
||||
}
|
||||
|
|
25
module.nix
25
module.nix
|
@ -1,18 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.lsfg-vk;
|
||||
lsfg-vk = pkgs.callPackage ./default.nix {};
|
||||
lsfg-vk = pkgs.callPackage ./default.nix { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.lsfg-vk = {
|
||||
enable = lib.mkEnableOption "Lossless Scaling Frame Generation Vulkan layer";
|
||||
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
description = "The lsfg-vk package to use";
|
||||
default = lsfg-vk;
|
||||
};
|
||||
|
||||
losslessDLLFile = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = null;
|
||||
example = "/home/user/games/Lossless Scaling/Lossless.dll";
|
||||
description = ''
|
||||
Sets the LSFG_DLL_PATH environment variable.
|
||||
Required if Lossless Scaling isn't installed in a standard location
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -20,7 +35,9 @@ in
|
|||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
# Installs the Vulkan implicit layer system-wide
|
||||
environment.etc."vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
|
||||
environment.etc."vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
|
||||
"${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
|
||||
|
||||
environment.sessionVariables.LSFG_DLL_PATH = lib.mkIf (cfg.losslessDLLFile != null) cfg.losslessDLLFile;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue