From d56695facce003a9923245d6c4684a1af25d32e6 Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 15 Jan 2026 12:39:30 +0100 Subject: [PATCH 1/2] unfree refactor --- flake.nix | 7 ++++--- unfree.nix => hosts/lilith-lab/unfree.nix | 0 hosts/lilith-pad/unfree.nix | 14 ++++++++++++++ hosts/lilith-pc/unfree.nix | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) rename unfree.nix => hosts/lilith-lab/unfree.nix (100%) create mode 100644 hosts/lilith-pad/unfree.nix create mode 100644 hosts/lilith-pc/unfree.nix 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..9c46533 --- /dev/null +++ b/hosts/lilith-pc/unfree.nix @@ -0,0 +1,14 @@ +{ + allowed = [ + "steam" + "steam-unwrapped" + + "libcublas" + "cuda_cudart" + "cuda_cccl" + "cuda_nvcc" + "nvidia-x11" + "nvidia-settings" + "nvidia-persistenced" + ]; +} From 2f7dc233985b4311a84f9af983cd086778e13d54 Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 15 Jan 2026 12:40:47 +0100 Subject: [PATCH 2/2] unfree refactor --- hosts/lilith-pc/unfree.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hosts/lilith-pc/unfree.nix b/hosts/lilith-pc/unfree.nix index 9c46533..6675cc3 100644 --- a/hosts/lilith-pc/unfree.nix +++ b/hosts/lilith-pc/unfree.nix @@ -2,13 +2,5 @@ allowed = [ "steam" "steam-unwrapped" - - "libcublas" - "cuda_cudart" - "cuda_cccl" - "cuda_nvcc" - "nvidia-x11" - "nvidia-settings" - "nvidia-persistenced" ]; }