Added assertions for desktop options

This commit is contained in:
Jurn Wubben 2025-05-24 15:08:55 +02:00
parent 33f9df0b2e
commit baaa3237a2

View file

@ -1,5 +1,12 @@
{lib, ...}: let {
config,
lib,
...
}: let
mkEO = lib.mkEnableOption; mkEO = lib.mkEnableOption;
cfg = config.niksos.desktop;
inherit (lib) mkIf optional;
in { in {
imports = [ imports = [
./greetd.nix ./greetd.nix
@ -15,4 +22,12 @@ in {
hyprland = mkEO "enable hyprland related programs."; hyprland = mkEO "enable hyprland related programs.";
kde = mkEO "enable kde specialisation."; kde = mkEO "enable kde specialisation.";
}; };
config.assertions = mkIf (cfg.hyprland
|| cfg.kde) [
{
assertion = cfg.enable;
message = "You need to enable desktop for the hyprland/kde module to work";
}
];
} }