summaryrefslogtreecommitdiffstats
path: root/hosts/poweredge-pro/vaultwarden.nix
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2026-11-28 14:52:29 -0600
committerTim Keller <tjk@tjkeller.xyz>2026-11-28 14:52:29 -0600
commit35a3b814101ec8bcc0478863a25a46e293d12411 (patch)
treed0c1a9adb2854d99daa8f122a075d942afd03989 /hosts/poweredge-pro/vaultwarden.nix
parent40f4332ed9e1274a1cba377318b7b5e2698b6a47 (diff)
downloadnixos-35a3b814101ec8bcc0478863a25a46e293d12411.tar.xz
nixos-35a3b814101ec8bcc0478863a25a46e293d12411.zip
reformat and rebind dns for wg-easy
Diffstat (limited to 'hosts/poweredge-pro/vaultwarden.nix')
-rw-r--r--hosts/poweredge-pro/vaultwarden.nix22
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";