vault: do not restart the service on "nixos-rebuild switch"

Volth 334e85e7 c3996de4

Changed files
+2
nixos
modules
services
security
+2
nixos/modules/services/security/vault.nix
···
after = [ "network.target" ]
++ optional (config.services.consul.enable && cfg.storageBackend == "consul") "consul.service";
+
restartIfChanged = false; # do not restart on "nixos-rebuild switch". It would seal the storage and disrupt the clients.
+
preStart = optionalString (cfg.storagePath != null) ''
install -d -m0700 -o vault -g vault "${cfg.storagePath}"
'';