adding ddns with cloudflare
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.homelab.ddns;
|
||||
token = config.sops.secrets."cloudflare/api_token".path;
|
||||
in {
|
||||
options.homelab.ddns = {
|
||||
enable = lib.mkEnableOption "enables ddns with cloudflare";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.cloudflare-ddns = {
|
||||
enable = true;
|
||||
credentialsFile = token;
|
||||
domains = [
|
||||
"mc.recoil.pro"
|
||||
"superflat.recoil.pro"
|
||||
"skyblock.recoil.pro"
|
||||
"git.blakedheld.xyz"
|
||||
];
|
||||
};
|
||||
|
||||
# network config
|
||||
|
||||
# declare authkey secrets
|
||||
sops.secrets = {
|
||||
"cloudflare/api_token" = {
|
||||
owner = "root";
|
||||
group = "cloudflare-ddns"
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -64,6 +64,7 @@ in
|
||||
./home/mosquitto
|
||||
./uptime-kuma
|
||||
./tailscale
|
||||
./ddns
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
Reference in New Issue
Block a user