2024-07-26 23:07:07 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2024-04-13 18:10:01 +00:00
|
|
|
inherit (lib) mkOption types;
|
|
|
|
|
2024-04-13 18:56:51 +00:00
|
|
|
cfg = config.myOptions.device.roles;
|
2024-04-13 18:10:01 +00:00
|
|
|
in {
|
|
|
|
options.myOptions.device.roles = {
|
|
|
|
type = mkOption {
|
|
|
|
type = types.enum ["laptop" "desktop" "server"];
|
|
|
|
default = "";
|
|
|
|
description = ''
|
|
|
|
The type/purpoes of the device that will be used within the rest of the configuration.
|
|
|
|
- laptop: portable devices with battery optimizations
|
|
|
|
- desktop: stationary devices configured for maximum performance
|
|
|
|
- server: server and infrastructure
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual-machine = mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Is this system a virtual machine?";
|
|
|
|
};
|
|
|
|
|
|
|
|
isWorkstation = mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = builtins.elem cfg.type ["laptop" "desktop"];
|
|
|
|
readOnly = true;
|
|
|
|
description = ''
|
|
|
|
Is this machine a workstation?
|
|
|
|
|
|
|
|
Workstation machines are meant for regular day-to-day use.
|
|
|
|
'';
|
|
|
|
};
|
2024-09-24 09:19:54 +00:00
|
|
|
|
|
|
|
isUniMachine = mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Should University specific configuration be applied?
|
|
|
|
|
|
|
|
(Things like University specific software, etc.)
|
|
|
|
'';
|
|
|
|
};
|
2024-04-13 18:10:01 +00:00
|
|
|
};
|
|
|
|
}
|