diff options
Diffstat (limited to 'hosts/poweredge-pro/vaultwarden.nix')
| -rw-r--r-- | hosts/poweredge-pro/vaultwarden.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/hosts/poweredge-pro/vaultwarden.nix b/hosts/poweredge-pro/vaultwarden.nix index df2b81b..d79c349 100644 --- a/hosts/poweredge-pro/vaultwarden.nix +++ b/hosts/poweredge-pro/vaultwarden.nix @@ -1,4 +1,4 @@ -{ +{ config, ... }: { # Secrets sops.secrets.vaultwarden-env = { sopsFile = ./resources/secrets/vaultwarden.yaml; key = "environment"; }; @@ -10,21 +10,23 @@ localMacAddress = "02:00:00:00:77:17"; ephemeral = true; - bindMounts = { - "/var/lib/vaultwarden" = { - hostPath = "/nix/persist/vaultwarden"; - isReadOnly = false; - }; - "/run/secrets/vaultwarden.env" = { - hostPath = "/run/secrets/vaultwarden-env"; - isReadOnly = true; - }; + # Persist db + bindMounts."/var/lib/vaultwarden" = { + hostPath = "/nix/persist/vaultwarden"; + isReadOnly = false; + }; + + # Bind secrets + bindMounts."/run/secrets/vaultwarden.env" = { + hostPath = config.sops.secrets.vaultwarden-env.path; + isReadOnly = true; }; config = { ... }: { networking.interfaces.eth0.useDHCP = true; networking.firewall.allowedTCPPorts = [ 8000 ]; # Vaultwarden + # Vaultwarden services.vaultwarden = { enable = true; environmentFile = "/run/secrets/vaultwarden.env"; |
