strato-infra/nixos/machines/vaultwarden/default.nix
2022-05-22 12:10:21 +02:00

27 lines
682 B
Nix

{ config, pkgs, deployment, ... }: {
imports = [ ../../common ../../common/lxc.nix ];
networking.hostName = "vaultwarden";
system.stateVersion = "21.11";
networking.firewall.allowedTCPPorts = [ 8000 ];
deployment.keys."envFile" = {
user = "vaultwarden";
group = "vaultwarden";
destDir = "/var/lib/keys";
keyCommand = [ "vault" "kv" "get" "-field=env" "kv/vaultwarden" ];
};
services.vaultwarden = {
enable = true;
dbBackend = "postgresql";
environmentFile = "/var/lib/keys/envFile";
config = {
domain = "https://vaultwarden.asraphiel.dev";
signupsDomainsWhitelist = "voidcorp.nl";
rocketPort = 8000;
};
};
}