Use vault admin token

This commit is contained in:
Invariantspace 2024-12-14 21:15:09 -08:00
parent 3e1aa6421f
commit cee19a8b27
3 changed files with 53 additions and 47 deletions

View file

@ -1,4 +1,6 @@
{config, ...}: {
{config, ...}: let
vaultEnvironment = "vaultwarden/environment";
in {
services.vaultwarden = {
enable = true;
config = with config.constants; {
@ -8,5 +10,7 @@
ROCKET_ADDRESS = localhost;
ROCKET_PORT = port.vault;
};
environmentFile = config.sops.secrets.${vaultEnvironment}.path;
};
sops.secrets.${vaultEnvironment} = {};
}