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 { dontAssertNotificationDaemons = lib.mkOption {
default = true; default = false;
example = false; example = true;
description = '' description = ''
Whether to check for other notification daemons. Whether to check for other notification daemons.
@ -67,18 +67,27 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
assertions = [ assertions =
{ if !cfg.dontAssertNotificationDaemons then
assertion = cfg.dontAssertNotificationDaemons && !config.services.swaync.enable; let
message = '' notificationDaemons = [
Only one notification daemon can be enabled at once. You have enabled "swaync"
swaync and hyprpanel at once. "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 If you dont want to use hyprpanel's notification daemon, set
`programs.hyprpanel.dontAssertNotificationDaemons` to true. `programs.hyprpanel.dontAssertNotificationDaemons` to true.
''; '';
} }) notificationDaemons
]; else
[ ];
home.packages = [ cfg.package ]; home.packages = [ cfg.package ];