Add config for declaring hardware
This commit is contained in:
parent
7df03b263b
commit
ab09bd10eb
3 changed files with 55 additions and 0 deletions
43
lib/modules/hardware.nix
Normal file
43
lib/modules/hardware.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in {
|
||||
options = {
|
||||
valhalla = {
|
||||
hardware = {
|
||||
components = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "The names of the hardware components of the computer.";
|
||||
default = [];
|
||||
};
|
||||
|
||||
eyeX = mkOption {
|
||||
type = types.bool;
|
||||
description = "A value indicating whether a Tobii EyeX device is present.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
amdCPU = mkOption {
|
||||
type = types.bool;
|
||||
description = "A value indicating whether an AMD CPU is present.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
nvidiaGPU = mkOption {
|
||||
type = types.bool;
|
||||
description = "A value indicating whether an NVIDIA GPU is present.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
elgatoWave = mkOption {
|
||||
type = types.bool;
|
||||
description = "A value indicating whether an Elgato Wave device is present.";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
in {
|
||||
imports = [
|
||||
./git.nix
|
||||
./hardware.nix
|
||||
./i18n.nix
|
||||
./partition.nix
|
||||
./software.nix
|
||||
|
|
|
@ -25,6 +25,17 @@
|
|||
keepExisting = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
components = [
|
||||
"ROG Zenith Extreme Alpha"
|
||||
];
|
||||
|
||||
eyeX = true;
|
||||
amdCPU = true;
|
||||
nvidiaGPU = true;
|
||||
elgatoWave = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue