temp
This commit is contained in:
parent
dc4f3160cc
commit
93b7145e70
@ -14,6 +14,11 @@
|
|||||||
owner = "nextcloud";
|
owner = "nextcloud";
|
||||||
group = "nextcloud";
|
group = "nextcloud";
|
||||||
};
|
};
|
||||||
|
cloudflare-apitoken = {
|
||||||
|
path = "/etc/cloudflare/apiToken";
|
||||||
|
owner = "cloudflare-dyndns";
|
||||||
|
group = "cloudflare-dyndns";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
9
hosts/modules/server/cloudflare-dyndns.nix
Normal file
9
hosts/modules/server/cloudflare-dyndns.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
@ -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 ];
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user