mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(unifi): restartIfChanged = false
This commit is contained in:
parent
725a981d23
commit
d59101c9d9
1 changed files with 12 additions and 4 deletions
|
|
@ -4,8 +4,9 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.modules) mkIf mkMerge mkForce mkDefault;
|
||||
cfg = config.services.unifi;
|
||||
delayRestart = true;
|
||||
in {
|
||||
services.unifi = {
|
||||
enable = mkDefault true;
|
||||
|
|
@ -38,7 +39,14 @@ in {
|
|||
users.unifi.uid = 990;
|
||||
groups.unifi.gid = 990;
|
||||
};
|
||||
systemd.services.unifi = mkIf cfg.enable {
|
||||
gensokyo-zone.sharedMounts.unifi.path = mkDefault "/var/lib/unifi";
|
||||
};
|
||||
systemd.services.unifi = let
|
||||
restartConfig = {
|
||||
restartTriggers = mkForce [ ];
|
||||
restartIfChanged = false;
|
||||
};
|
||||
conf.gensokyo-zone.sharedMounts.unifi.path = mkDefault "/var/lib/unifi";
|
||||
in mkIf cfg.enable (mkMerge [
|
||||
conf
|
||||
(mkIf delayRestart restartConfig)
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue