diff --git a/flake.nix b/flake.nix index 5a6dbd2..de7c7d6 100644 --- a/flake.nix +++ b/flake.nix @@ -79,9 +79,10 @@ (hardware args).nixpkgs.hostPlatform; importNixpkgs = - system: nixpkgs: + system: host: nixpkgs: let - config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed; + config.allowUnfreePredicate = + pkg: builtins.elem (lib.getName pkg) (import ./hosts/${host}/unfree.nix).allowed; config.rocmSupport = true; in import nixpkgs { @@ -96,7 +97,7 @@ host: system: lib.nixosSystem { system = system; - pkgs = importNixpkgs system nixpkgs; + pkgs = importNixpkgs system host nixpkgs; specialArgs = inputs // { inherit system; }; diff --git a/unfree.nix b/hosts/lilith-lab/unfree.nix similarity index 100% rename from unfree.nix rename to hosts/lilith-lab/unfree.nix diff --git a/hosts/lilith-pad/unfree.nix b/hosts/lilith-pad/unfree.nix new file mode 100644 index 0000000..9c46533 --- /dev/null +++ b/hosts/lilith-pad/unfree.nix @@ -0,0 +1,14 @@ +{ + allowed = [ + "steam" + "steam-unwrapped" + + "libcublas" + "cuda_cudart" + "cuda_cccl" + "cuda_nvcc" + "nvidia-x11" + "nvidia-settings" + "nvidia-persistenced" + ]; +} diff --git a/hosts/lilith-pc/unfree.nix b/hosts/lilith-pc/unfree.nix new file mode 100644 index 0000000..6675cc3 --- /dev/null +++ b/hosts/lilith-pc/unfree.nix @@ -0,0 +1,6 @@ +{ + allowed = [ + "steam" + "steam-unwrapped" + ]; +}