Added assertions for desktop options
This commit is contained in:
parent
33f9df0b2e
commit
baaa3237a2
1 changed files with 16 additions and 1 deletions
|
|
@ -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";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue