mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
hyprpanel: remove dontAssertNotificationDaemons option
It didn't work anyway, and is now unnecessary as the upstream bugs were fixed
This commit is contained in:
parent
13b2744e11
commit
9b4a2a7c4f
1 changed files with 21 additions and 32 deletions
|
|
@ -11,6 +11,13 @@ in
|
|||
{
|
||||
meta.maintainers = [ lib.maintainers.perchun ];
|
||||
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "programs" "hyprpanel" "dontAssertNotificationDaemons " ] ''
|
||||
The hyprpanel never supported using it alongside other notification
|
||||
daemons, so this option never truly worked.
|
||||
'')
|
||||
];
|
||||
|
||||
options.programs.hyprpanel = {
|
||||
enable = lib.mkEnableOption "HyprPanel";
|
||||
|
||||
|
|
@ -52,42 +59,24 @@ in
|
|||
systemd.enable = lib.mkEnableOption "HyprPanel systemd integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
dontAssertNotificationDaemons = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Whether to check for other notification daemons.
|
||||
|
||||
You might want to set this to false, because hyprpanel's notification
|
||||
daemon is buggy and you may prefer something else.
|
||||
'';
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.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
|
||||
${name} and hyprpanel.
|
||||
|
||||
If you dont want to use hyprpanel's notification daemon, set
|
||||
`programs.hyprpanel.dontAssertNotificationDaemons` to true.
|
||||
'';
|
||||
}) notificationDaemons
|
||||
else
|
||||
[ ];
|
||||
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.
|
||||
'';
|
||||
}) notificationDaemons;
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue