mirror of
https://github.com/pabloaul/lsfg-vk-flake.git
synced 2025-08-27 10:56:29 -03:00
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.services.lsfg-vk;
|
|
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;
|
|
description = ''
|
|
Sets the LSFG_DLL_PATH environment variable.
|
|
Required if Lossless Scaling isn't installed in a standard location
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
# Installs the Vulkan implicit layer system-wide
|
|
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;
|
|
};
|
|
}
|