From 334e85e75abdfd87dd948ac226ed6c00d1143023 Mon Sep 17 00:00:00 2001 From: Volth Date: Mon, 3 Jul 2017 19:46:02 +0000 Subject: [PATCH] vault: do not restart the service on "nixos-rebuild switch" --- nixos/modules/services/security/vault.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/security/vault.nix b/nixos/modules/services/security/vault.nix index 6b11248adb33..146afec344ab 100644 --- a/nixos/modules/services/security/vault.nix +++ b/nixos/modules/services/security/vault.nix @@ -112,6 +112,8 @@ in 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}" '';