This commit is contained in:
Hadi 2024-06-18 10:10:21 +02:00 committed by GitHub
parent dc4f3160cc
commit 93b7145e70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 4 deletions

View File

@ -14,6 +14,11 @@
owner = "nextcloud"; owner = "nextcloud";
group = "nextcloud"; group = "nextcloud";
}; };
cloudflare-apitoken = {
path = "/etc/cloudflare/apiToken";
owner = "cloudflare-dyndns";
group = "cloudflare-dyndns";
};
}; };
}; };

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 let
hostname = "vault.anotherhadi.com";
url = "https://"+hostname;
port = 8222;
in{ in{
services.vaultwarden = { services.vaultwarden = {
enable = true; 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 ];
} }