quickshell: don't throw error when package is null

`programs.quickshell.package` is marked as nullable, but it will throw an error if set to null. This commit adds the necessary checks to allow setting the package to null.
This commit is contained in:
davidaf3
2026-05-05 23:58:53 +02:00
committed by Matthieu Coudron
parent 00ed86e58b
commit 7547f8942c

View File

@@ -63,9 +63,13 @@ in
assertion = !(builtins.any (name: lib.hasInfix "/" name) (builtins.attrNames cfg.configs));
message = "The names of configs in `programs.quickshell.configs` must not contain slashes.";
}
{
assertion = cfg.systemd.enable -> cfg.package != null;
message = "`programs.quickshell.systemd.enable` cannot be true when `programs.quickshell.package` is null";
}
];
home.packages = [ cfg.package ];
home.packages = lib.optionals (cfg.package != null) [ cfg.package ];
}
(lib.mkIf cfg.systemd.enable {