diff --git a/hosts/servers/poseidon/shares.nix b/hosts/servers/poseidon/shares.nix index 0e88d1d..a207088 100644 --- a/hosts/servers/poseidon/shares.nix +++ b/hosts/servers/poseidon/shares.nix @@ -53,9 +53,15 @@ let in { networking.firewall.allowedTCPPorts = tcpPorts; networking.firewall.allowedUDPPorts = udpPorts; - fileSystems."/export/containers" = { - device = "/Velaris/Containers"; - options = [ "bind" ]; + fileSystems ={ + "/export/containers" = { + device = "/Velaris/Containers"; + options = [ "bind" ]; + }; + "/export/velaris" = { + device = "/Velaris"; + options = ["bind"]; + }; }; systemd.services.iscsi-target = { @@ -75,6 +81,7 @@ in { exports = '' /export 10.5.0.0/24(rw,fsid=0,no_subtree_check,no_root_squash) /export/containers 10.5.0.0/24(rw,nohide,insecure,no_subtree_check,no_root_squash) + /export/velaris 10.5.0.0/24(rw,nohide,insecure,no_subtree_check,no_root_squash) ''; }; target = { diff --git a/modules/k3s/deployments/authentik.nix b/modules/k3s/deployments/authentik.nix index 50b29dd..92dbc2a 100644 --- a/modules/k3s/deployments/authentik.nix +++ b/modules/k3s/deployments/authentik.nix @@ -50,12 +50,6 @@ in periodSeconds = 30; timeoutSeconds = 5; }; - ports = [ - { - name = "test-port"; - containerPort = 80; - } - ]; volumeMounts = [ { mountPath = "/var/lib/postgresql/data"; diff --git a/modules/k3s/deployments/vaultwarden.nix b/modules/k3s/deployments/vaultwarden.nix new file mode 100644 index 0000000..5f8d2c5 --- /dev/null +++ b/modules/k3s/deployments/vaultwarden.nix @@ -0,0 +1,75 @@ +{ ... }: +{ + vaultwarden.content = [ + { + apiVersion = "apps/v1"; + kind = "Deployment"; + metadata = { + name = "vaultwarden"; + labels.app = "vaultwarden"; + }; + spec = { + selector.matchLabels.app = "vaultwarden"; + template = { + metadata = { + labels.app = "vaultwarden"; + }; + spec = { + securityContext = { + runAsUser = 1000; + runAsGroup = 1000; + }; + containers = [ + { + name = "vaultwarden"; + image = "vaultwarden/server:latest"; + ports = [ + { + name = "vaultwarden-http"; + containerPort = 80; + } + ]; + volumeMounts = [ + { + mountPath = "/data"; + name = "iscsi"; + subPath = "vaultwarden"; + } + ]; + } + ]; + volumes = [ + { + name = "iscsi"; + iscsi = { + targetPortal = "10.5.0.2:3260"; + iqn = "iqn.2026-01.dev.nyxerinys:poseidon.vaultwarden"; + lun = 0; + fsType = "xfs"; + readOnly = false; + }; + } + ]; + }; + }; + }; + } + { + apiVersion = "v1"; + kind = "Service"; + metadata.name = "vaultwarden"; + spec = { + type = "NodePort"; + selector.app = "vaultwarden"; + ports = [ + { + name = "vaultwarden-http"; + portocol = "TCP"; + port = 80; + nodePort = 30000; + } + ]; + }; + } + ]; +} \ No newline at end of file