This commit is contained in:
Hadi
2024-06-18 10:10:21 +02:00
committed by GitHub
parent dc4f3160cc
commit 93b7145e70
3 changed files with 33 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
{
services.cloudflare-dyndns = {
enable = true;
ipv4 = true;
domains = [ "cloud.anotherhadi.com" "vault.anotherhadi.com" "try.anotherhadi.com"];
proxied = true;
apiTokenFile = "/etc/cloudflare/apiToken";
};
}

View File

@@ -1,9 +1,24 @@
let
hostname = "vault.anotherhadi.com";
url = "https://"+hostname;
port = 8222;
in{
services.vaultwarden = {
enable = true;
config = ''
}
config = {
DOMAIN = url;
SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = port;
ROCKET_LOG = "critical";
};
};
services.nginx.virtualHosts.${hostname} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${port}";
};
};
networking.firewall.allowedTCPPorts = [ port ];
}