mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-09 18:41:06 +01:00
hyprpanel: fix dontAssertNotificationDaemons (#7745)
Also, add more daemons to check
This commit is contained in:
parent
ed1a98c375
commit
b08f873777
1 changed files with 22 additions and 13 deletions
|
|
@ -54,8 +54,8 @@ in
|
|||
};
|
||||
|
||||
dontAssertNotificationDaemons = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Whether to check for other notification daemons.
|
||||
|
||||
|
|
@ -67,18 +67,27 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.dontAssertNotificationDaemons && !config.services.swaync.enable;
|
||||
assertions =
|
||||
if !cfg.dontAssertNotificationDaemons then
|
||||
let
|
||||
notificationDaemons = [
|
||||
"swaync"
|
||||
"dunst"
|
||||
"mako"
|
||||
];
|
||||
in
|
||||
builtins.map (name: {
|
||||
assertion = !config.services.${name}.enable;
|
||||
message = ''
|
||||
Only one notification daemon can be enabled at once. You have enabled
|
||||
swaync and hyprpanel at once.
|
||||
${name} and hyprpanel.
|
||||
|
||||
If you dont want to use hyprpanel's notification daemon, set
|
||||
`programs.hyprpanel.dontAssertNotificationDaemons` to true.
|
||||
'';
|
||||
}
|
||||
];
|
||||
}) notificationDaemons
|
||||
else
|
||||
[ ];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue