Anthony Rodriguez
b89a42ef13
The next step in the refactoring is to add different profiles, so that we may toggle them easily in our hosts. Here's the profiles I went for: - desktop: enables everything a desktop computer needs (graphics, productivity apps, base apps such as browsers...) - gaming: enables gaming configurations (steam, gamescope...) - server: enables server configurations (website hosting, git forge...) I made sure the server profile can not be enabled if desktop/gaming are enabled, as it would not make sense to have desktop applications and configurations on a server.
18 lines
369 B
Nix
18 lines
369 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkEnableOption;
|
|
in {
|
|
options = {
|
|
local.profiles.desktop.enable = mkEnableOption "the desktop profile";
|
|
};
|
|
|
|
config.assertions = [
|
|
{
|
|
assertion = !config.local.profiles.server.enable;
|
|
message = "The desktop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
|
|
}
|
|
];
|
|
}
|