Merge pull request #281606 from MarcelCoding/bird-no-auto-restart
nixos/bird2: add option to disable auto reload
This commit is contained in:
@@ -18,6 +18,13 @@ in
|
||||
<http://bird.network.cz/>
|
||||
'';
|
||||
};
|
||||
autoReload = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc ''
|
||||
Whether bird2 should be automatically reloaded when the configuration changes.
|
||||
'';
|
||||
};
|
||||
checkConfig = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
@@ -68,7 +75,7 @@ in
|
||||
systemd.services.bird2 = {
|
||||
description = "BIRD Internet Routing Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
reloadTriggers = [ config.environment.etc."bird/bird2.conf".source ];
|
||||
reloadTriggers = lib.optional cfg.autoReload config.environment.etc."bird/bird2.conf".source;
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
Restart = "on-failure";
|
||||
|
||||
Reference in New Issue
Block a user