Update greatyamada config
This commit is contained in:
parent
5c4921895e
commit
97bf3bb177
22 changed files with 556 additions and 212 deletions
36
hosts/greatyamada/services/vaultwarden.nix
Normal file
36
hosts/greatyamada/services/vaultwarden.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
portDefinitions = import ./_port-definitions.nix;
|
||||
nginxLocalServiceConfig = import ./nginx-local-config.nix;
|
||||
in {
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
config = {
|
||||
domain = "https://vaultwarden.rcia.dev";
|
||||
rocketAddress = "127.0.0.1";
|
||||
rocketPort = portDefinitions.vaultwarden;
|
||||
showPasswordHint = false;
|
||||
signupsAllowed = false;
|
||||
};
|
||||
environmentFile = config.sops.templates."vaultwarden.env".path;
|
||||
};
|
||||
nginx.virtualHosts."vaultwarden.rcia.dev" = {
|
||||
locations."/".proxyPass =
|
||||
"http://localhost:${toString portDefinitions.vaultwarden}";
|
||||
forceSSL = true;
|
||||
useACMEHost = "rcia.dev";
|
||||
extraConfig = nginxLocalServiceConfig;
|
||||
};
|
||||
};
|
||||
sops = {
|
||||
secrets."vaultwarden_database_url" = { };
|
||||
templates."vaultwarden.env" = {
|
||||
content = ''
|
||||
DATABASE_URL=${config.sops.placeholder."vaultwarden_database_url"}
|
||||
'';
|
||||
owner = "vaultwarden";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue