mirror of
https://github.com/nix-community/home-manager
synced 2025-02-07 00:35:04 +01:00
imapnotify: add wait
option to imapnotify-accounts
`wait` is no longer a part of the goimapnotify's config, but one of its cli options.
This commit is contained in:
parent
1b4f2a4816
commit
6168b2d98f
3 changed files with 12 additions and 3 deletions
|
@ -30,10 +30,17 @@ with lib;
|
||||||
description = "IMAP folders to watch.";
|
description = "IMAP folders to watch.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wait = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 1;
|
||||||
|
example = 10;
|
||||||
|
description =
|
||||||
|
"Wait time in seconds between IDLE event and execution of scripts";
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
|
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
example = { wait = 10; };
|
|
||||||
description = "Additional configuration to add for this account.";
|
description = "Additional configuration to add for this account.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,9 @@ let
|
||||||
Service = {
|
Service = {
|
||||||
# Use the nix store path for config to ensure service restarts when it changes
|
# Use the nix store path for config to ensure service restarts when it changes
|
||||||
ExecStart =
|
ExecStart =
|
||||||
"${getExe cfg.package} -conf '${genAccountConfig account}'";
|
"${getExe cfg.package} -conf '${genAccountConfig account}' -wait ${
|
||||||
|
toString account.imapnotify.wait
|
||||||
|
}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
|
|
|
@ -4,7 +4,7 @@ WantedBy=default.target
|
||||||
[Service]
|
[Service]
|
||||||
Environment=PATH=
|
Environment=PATH=
|
||||||
Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config
|
Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config
|
||||||
ExecStart=@goimapnotify@/bin/goimapnotify -conf '/nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json'
|
ExecStart=@goimapnotify@/bin/goimapnotify -conf '/nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json' -wait 1
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
Loading…
Add table
Reference in a new issue