services: vault poc
This commit is contained in:
parent
419d2e8cd7
commit
8eb9b3952a
41
modules/services/server/vaultwarden.nix
Normal file
41
modules/services/server/vaultwarden.nix
Normal 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";
|
||||
};
|
||||
}
|
@ -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;
|
||||
|
BIN
secrets/services/vaultwarden/environment.age
Normal file
BIN
secrets/services/vaultwarden/environment.age
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user