1
0
Fork 0
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:
Perchun Pak 2025-09-04 15:18:34 +02:00 committed by GitHub
parent ed1a98c375
commit b08f873777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
message = ''
Only one notification daemon can be enabled at once. You have enabled
swaync and hyprpanel at once.
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
${name} and hyprpanel.
If you dont want to use hyprpanel's notification daemon, set
`programs.hyprpanel.dontAssertNotificationDaemons` to true.
'';
}
];
If you dont want to use hyprpanel's notification daemon, set
`programs.hyprpanel.dontAssertNotificationDaemons` to true.
'';
}) notificationDaemons
else
[ ];
home.packages = [ cfg.package ];