mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
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:
committed by
Matthieu Coudron
parent
00ed86e58b
commit
7547f8942c
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user