unfree refactor
This commit is contained in:
parent
e30124e985
commit
d56695facc
4 changed files with 32 additions and 3 deletions
|
|
@ -79,9 +79,10 @@
|
||||||
(hardware args).nixpkgs.hostPlatform;
|
(hardware args).nixpkgs.hostPlatform;
|
||||||
|
|
||||||
importNixpkgs =
|
importNixpkgs =
|
||||||
system: nixpkgs:
|
system: host: nixpkgs:
|
||||||
let
|
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;
|
config.rocmSupport = true;
|
||||||
in
|
in
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
|
|
@ -96,7 +97,7 @@
|
||||||
host: system:
|
host: system:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
pkgs = importNixpkgs system nixpkgs;
|
pkgs = importNixpkgs system host nixpkgs;
|
||||||
specialArgs = inputs // {
|
specialArgs = inputs // {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
14
hosts/lilith-pad/unfree.nix
Normal file
14
hosts/lilith-pad/unfree.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
allowed = [
|
||||||
|
"steam"
|
||||||
|
"steam-unwrapped"
|
||||||
|
|
||||||
|
"libcublas"
|
||||||
|
"cuda_cudart"
|
||||||
|
"cuda_cccl"
|
||||||
|
"cuda_nvcc"
|
||||||
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
|
"nvidia-persistenced"
|
||||||
|
];
|
||||||
|
}
|
||||||
14
hosts/lilith-pc/unfree.nix
Normal file
14
hosts/lilith-pc/unfree.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
allowed = [
|
||||||
|
"steam"
|
||||||
|
"steam-unwrapped"
|
||||||
|
|
||||||
|
"libcublas"
|
||||||
|
"cuda_cudart"
|
||||||
|
"cuda_cccl"
|
||||||
|
"cuda_nvcc"
|
||||||
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
|
"nvidia-persistenced"
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue