36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ pkgs, config, ... }:
|
|
let
|
|
LosslessDllPath = config.home.homeDirectory + "/.local/lib/Lossless.dll";
|
|
in
|
|
{
|
|
home.file = {
|
|
".local/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
|
|
"${pkgs.lsfg-vk}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
|
|
".local/lib/liblsfg-vk.so".source = "${pkgs.lsfg-vk}/lib/liblsfg-vk.so";
|
|
};
|
|
|
|
home.sessionVariables = {
|
|
# ENABLE_LSFG = 1; # Don't enable session wide, to avoid bugs
|
|
LSFG_MULTIPLIER = 2;
|
|
LSFG_DLL_PATH = LosslessDllPath;
|
|
};
|
|
|
|
# Put the dll in a reachable location for steam games
|
|
# Secrets normally are a symlink to /run/user/1000/secrets.d/
|
|
# Every time sops-nix.service runs, we copy the dll
|
|
systemd.user.services.copy-lsfg-dll = {
|
|
Service = {
|
|
ExecStart = pkgs.writeShellScript "copy-lsfg-dll" ''
|
|
cp -fv "${config.sops.secrets."lsfg.dll".path}" "${LosslessDllPath}"
|
|
'';
|
|
Type = "oneshot";
|
|
};
|
|
Unit.After = [ "sops-nix.service" ];
|
|
Install.WantedBy = [ "sops-nix.service" ];
|
|
};
|
|
|
|
sops.secrets."lsfg.dll" = {
|
|
sopsFile = ../../secrets/lsfg.dll.gpg;
|
|
format = "binary";
|
|
};
|
|
}
|