assertions
This commit is contained in:
@@ -36,6 +36,30 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
assertions =
|
||||
let
|
||||
desktopCount = lib.count lib.id [
|
||||
config.${namespace}.desktop.gnome.enable
|
||||
config.${namespace}.desktop.hyprland.enable
|
||||
config.${namespace}.desktop.cosmic.enable
|
||||
];
|
||||
in
|
||||
[
|
||||
{
|
||||
assertion = desktopCount <= 1;
|
||||
message = ''
|
||||
At most one desktop environment may be enabled simultaneously.
|
||||
Currently enabled: ${
|
||||
lib.concatStringsSep ", " (
|
||||
lib.optional config.${namespace}.desktop.gnome.enable "gnome"
|
||||
++ lib.optional config.${namespace}.desktop.hyprland.enable "hyprland"
|
||||
++ lib.optional config.${namespace}.desktop.cosmic.enable "cosmic"
|
||||
)
|
||||
}.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
# ${namespace}.home.extraOptions = {
|
||||
# home.file = lib.mkAliasDefinitions options.${namespace}.home.file;
|
||||
# home.stateVersion = lib.mkOptionDefault config.system.stateVersion;
|
||||
|
||||
Reference in New Issue
Block a user