nixdots/options/device/hardware.nix
2024-04-12 21:38:05 +02:00

30 lines
814 B
Nix

{ lib, ... }: with lib; let
in
{
options.myOptions.device = {
cpu.type = mkOption {
type = with types; nullOr (enum [ "intel" "amd" ]);
default = null;
description = ''
The manifaturer/type of the primary system CPU.
Determines which ucode services will be enabled and provides additional kernel packages.
If running in a virtual machine with forwarded/shared cores (CPU passthrough), use the
cpu type of the host machine.
'';
};
virtual-machine = mkOption {
type = lib.types.bool;
default = false;
description = "Is this system a virtual machine?";
};
hasTPM = mkOption {
type = lib.types.bool;
default = false;
description = "Does this device have a TPM (Trusted Platform Module)?"
}
};
}