diff --git a/modules/options/profiles.nix b/modules/options/profiles.nix index 02772d0..6572858 100644 --- a/modules/options/profiles.nix +++ b/modules/options/profiles.nix @@ -1,6 +1,24 @@ -{lib, ...}: { +{ + lib, + config, + ... +}: let + cfg = config.marleycfg.profiles; +in { options.marleycfg.profiles = { desktop = lib.mkEnableOption "graphical desktop profile"; server = lib.mkEnableOption "server profile"; }; + + config = lib.mkIf cfg.server { + assertions = [ + { + assertion = cfg.server -> !cfg.desktop; + message = '' + The marleycfg.profiles.server and marleycfg.profiles.desktop options + are mutually exclusive. + ''; + } + ]; + }; }