Merge pull request #281606 from MarcelCoding/bird-no-auto-restart

nixos/bird2: add option to disable auto reload
This commit is contained in:
h7x4
2024-01-22 01:24:37 +01:00
committed by GitHub
+8 -1
View File
@@ -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";