Merge pull request #260291 from donovanglover/nixos-containers/optional-restart
nixos/nixos-containers: add restartIfChanged option
This commit is contained in:
commit
fbc62319f1
1 changed files with 10 additions and 1 deletions
|
@ -649,6 +649,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
restartIfChanged = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc ''
|
||||
Whether the container should be restarted during a NixOS
|
||||
configuration switch if its definition has changed.
|
||||
'';
|
||||
};
|
||||
|
||||
timeoutStartSec = mkOption {
|
||||
type = types.str;
|
||||
default = "1min";
|
||||
|
@ -826,7 +835,7 @@ in
|
|||
containerConfig.path
|
||||
config.environment.etc."${configurationDirectoryName}/${name}.conf".source
|
||||
];
|
||||
restartIfChanged = true;
|
||||
restartIfChanged = containerConfig.restartIfChanged;
|
||||
}
|
||||
)
|
||||
)) config.containers)
|
||||
|
|
Loading…
Reference in a new issue