diff --git a/configs/nixos/plover/default.nix b/configs/nixos/plover/default.nix index c23e82f8..c9916cab 100644 --- a/configs/nixos/plover/default.nix +++ b/configs/nixos/plover/default.nix @@ -28,6 +28,9 @@ reverse-proxy.enable = true; fail2ban.enable = true; grafana.enable = true; + + # All of the self-hosted applications belong in here. + vaultwarden.enable = true; }; # We're using our own VPN configuration for this one. diff --git a/configs/nixos/plover/modules/services/vaultwarden.nix b/configs/nixos/plover/modules/services/vaultwarden.nix index a7e38271..7c726bf8 100644 --- a/configs/nixos/plover/modules/services/vaultwarden.nix +++ b/configs/nixos/plover/modules/services/vaultwarden.nix @@ -20,6 +20,8 @@ in config = lib.mkIf cfg.enable (lib.mkMerge [ { + state.ports.vaultwarden.value = 8222; + sops.secrets = foodogsquaredLib.sops-nix.getSecrets ../../secrets/secrets.yaml { "vaultwarden/env".owner = vaultwardenUser; }; @@ -32,7 +34,7 @@ in # Configuring the server. ROCKET_ADDRESS = "127.0.0.1"; - ROCKET_PORT = 8222; + ROCKET_PORT = config.state.ports.vaultwarden.value; # Ehh... It's only a few (or even one) users anyways so nah. Since this # instance will not configure SMTP server, this pretty much means @@ -55,12 +57,6 @@ in # Enabling web vault with whatever nixpkgs comes in. WEB_VAULT_ENABLED = true; - - # Mailer service configuration (except the user and password). - SMTP_HOST = "smtp.sendgrid.net"; - SMTP_PORT = 587; - SMTP_FROM_NAME = "Vaultwarden"; - SMTP_FROM = "bot+vaultwarden@foodogsquared.one"; }; };