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 {
|
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
|
||||||
|
notificationDaemons = [
|
||||||
|
"swaync"
|
||||||
|
"dunst"
|
||||||
|
"mako"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
builtins.map (name: {
|
||||||
|
assertion = !config.services.${name}.enable;
|
||||||
message = ''
|
message = ''
|
||||||
Only one notification daemon can be enabled at once. You have enabled
|
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
|
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 ];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue