diff --git a/container/Ddns.nix b/container/Ddns.nix deleted file mode 100644 index 2f0ca53d..00000000 --- a/container/Ddns.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - config, - container, - lib, - ... -}: let - cfg = config.container.module.ddns; -in { - options.container.module.ddns = { - enable = lib.mkEnableOption "the dynamic dns client."; - address = lib.mkOption { - default = "10.1.0.31"; - type = lib.types.str; - }; - storage = lib.mkOption { - default = "${config.container.storage}/ddns"; - type = lib.types.str; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.tmpfiles.rules = container.mkContainerDir cfg [ - "data" - ]; - - containers.ddns = container.mkContainer cfg { - bindMounts = { - "/data" = { - hostPath = "${cfg.storage}/data"; - isReadOnly = true; - }; - }; - - config = { ... }: container.mkContainerConfig cfg { - services.cloudflare-dyndns = { - enable = true; - apiTokenFile = "/data/token"; - deleteMissing = false; - ipv4 = true; - ipv6 = true; - proxied = false; - domains = let - domain = config.container.domain; - in [ - domain - ] ++ map (sub: "${sub}.${domain}") [ - "cloud" - "git" - "mail" - "office" - "paste" - "play" - "vpn" - ]; - }; - }; - }; - }; -} diff --git a/host/x86_64-linux/home/Container.nix b/host/x86_64-linux/home/Container.nix index b1876163..e19d6c02 100644 --- a/host/x86_64-linux/home/Container.nix +++ b/host/x86_64-linux/home/Container.nix @@ -10,7 +10,6 @@ module = { change.enable = true; cloud.enable = true; - ddns.enable = true; dns.enable = true; download.enable = true; frkn.enable = true; diff --git a/host/x86_64-linux/home/Ddns.nix b/host/x86_64-linux/home/Ddns.nix new file mode 100644 index 00000000..15648524 --- /dev/null +++ b/host/x86_64-linux/home/Ddns.nix @@ -0,0 +1,22 @@ +{ ... }: { + services.cloudflare-dyndns = { + enable = true; + apiTokenFile = "/storage/hot/container/ddns/data/token"; + deleteMissing = false; + ipv4 = true; + ipv6 = true; + proxied = false; + domains = let + domain = "voronind.com"; + in [ + domain + ] ++ map (sub: "${sub}.${domain}") [ + "cloud" + "git" + "mail" + "office" + "paste" + "vpn" + ]; + }; +}