common: move to modules, move some files out, modules: adjust dir structure
This commit is contained in:
parent
ed5f8c3ae6
commit
0bc9abc4c0
43 changed files with 86 additions and 83 deletions
29
modules/nixos/services/homeserver/vaultwarden.nix
Executable file
29
modules/nixos/services/homeserver/vaultwarden.nix
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
sops.secrets."vaultwarden/secrets.env".restartUnits = [ "vaultwarden.service" ];
|
||||
|
||||
services.caddy.virtualHosts."vaultwarden.taild5f7e6.net".extraConfig =
|
||||
assert config.services.caddy.enable;
|
||||
''
|
||||
import default-settings
|
||||
|
||||
bind tailscale/vaultwarden
|
||||
|
||||
# block connections to admin login
|
||||
respond /admin/* 403
|
||||
|
||||
reverse_proxy localhost:8000
|
||||
'';
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backups/vaultwarden";
|
||||
config = {
|
||||
DOMAIN = "https://vaultwarden.taild5f7e6.ts.net";
|
||||
|
||||
SIGNUPS_ALLOWED = false;
|
||||
};
|
||||
environmentFile = config.sops.secrets."vaultwarden/secrets.env".path;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue