diff options
author | Graham Christensen <graham@grahamc.com> | 2019-06-06 10:19:07 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2019-06-06 11:57:08 -0400 |
commit | b2fbbad107a4086bac3c9ffbee4463c4539757e3 (patch) | |
tree | a437177abfef43c8804dab97b18304251bafd9cd /nixos | |
parent | e7872cda4bb213b3229cf35a7a001f172daf45fc (diff) |
nixos containers: restart containers with autoStart = true when their conf changes
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 604ad14b8384..97243e3304ee 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -710,8 +710,11 @@ in wantedBy = [ "machines.target" ]; wants = [ "network.target" ]; after = [ "network.target" ]; - restartTriggers = [ containerConfig.path ]; - reloadIfChanged = true; + restartTriggers = [ + containerConfig.path + config.environment.etc."containers/${name}.conf".source + ]; + restartIfChanged = true; } else {}) )) config.containers) |