services: vault poc

This commit is contained in:
Kabbone 2024-10-21 12:17:54 +02:00
parent 419d2e8cd7
commit 8eb9b3952a
Signed by: Kabbone
SSH Key Fingerprint: SHA256:ezolxoMIF3LNo1yc1aGNCvFNUiSZNjUbNhrZohFeKd0
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,41 @@
#
# System notifications
#
{ config, lib, pkgs, ... }:
{
services.vaultwarden = {
enable = true;
dbBackend = "postgresql";
backupDir = "/var/backup/vaultwarden";
environmentFile = config.age.secrets."services/vaultwarden/environment".path;
config = {
DOMAIN = "https://vault.kabtop.de";
SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222;
ROCKET_LOG = "critical";
};
};
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = {
"${config.services.vaultwarden.config.DOMAIN}" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
};
};
};
age.secrets."services/vaultwarden/environment" = {
file = ../../../secrets/services/vaultwarden/environment.age;
owner = "vaultwarden";
};
}

View File

@ -81,6 +81,7 @@ in
"services/gitea/mailerPassword.age".publicKeys = servers ++ users;
"services/gitea/homerunner-token.age".publicKeys = homerunners ++ users;
"services/gitea/serverrunner-token.age".publicKeys = serverrunners ++ users;
"services/vaultwarden/environment.age".publicKeys = servers ++ users;
"services/acme/opel-online.age".publicKeys = buildServer ++ users;
"keys/nixremote.age".publicKeys = buildClients ++ users;
"keys/nixservepriv.age".publicKeys = buildServer ++ users;

Binary file not shown.