The options API has been updated, in order for a more flexible setup with `local.modules.desktop.enable` being replaced with an enum of desktops at `local.systemVars.desktop`, which allows for switching desktop environments by changing a single option. This is so that we can switch to cosmic and only enable the programs we need (i.e. disable greetd because we use cosmic-greeter and enable terminals since that is desktop related). This is simpler than having a different module per desktop.
23 lines
595 B
Nix
23 lines
595 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkEnableOption;
|
|
in {
|
|
options = {
|
|
local.profiles.server.enable = mkEnableOption "the server profile";
|
|
};
|
|
|
|
config.assertions = lib.mkIf config.local.profiles.server.enable [
|
|
{
|
|
assertion = !(config.local.systemVars.desktop != "none");
|
|
message = "The server profile cannot be enabled if `local.profiles.desktop.enable` is set to true.";
|
|
}
|
|
|
|
{
|
|
assertion = !config.local.profiles.gaming.enable;
|
|
message = "The server profile cannot be enabled if `local.profiles.gaming.enable` is set to true.";
|
|
}
|
|
];
|
|
}
|