mirror of
https://github.com/pabloaul/lsfg-vk-flake.git
synced 2025-08-27 19:06:28 -03:00
module.nix: init
This commit is contained in:
parent
f24d8fe371
commit
585a398dbc
2 changed files with 27 additions and 0 deletions
|
@ -6,5 +6,6 @@
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in {
|
in {
|
||||||
packages.${system}.default = pkgs.callPackage ./default.nix {};
|
packages.${system}.default = pkgs.callPackage ./default.nix {};
|
||||||
|
nixosModules.default = import ./module.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
26
module.nix
Normal file
26
module.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue