diff --git a/hosts/sakoserver/configuration.nix b/hosts/sakoserver/configuration.nix index 9a52b559..2dd2b265 100644 --- a/hosts/sakoserver/configuration.nix +++ b/hosts/sakoserver/configuration.nix @@ -66,7 +66,7 @@ postgresql.enable = true; redis.enable = true; fail2ban.enable = true; - ddns.enable = true; + ddclient.enable = true; services = { forgejo.enable = true; headscale.enable = true; diff --git a/modules/server/ddclient.nix b/modules/server/ddclient.nix new file mode 100644 index 00000000..4b456007 --- /dev/null +++ b/modules/server/ddclient.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: +with lib; +let cfg = config.void.server.ddclient; +in { + options.void.server.ddclient = { enable = mkEnableOption false; }; + + config = mkIf cfg.enable { + services.ddclient = { + enable = true; + configFile = "/srv/secrets/ddclient.conf"; + }; + }; +} + diff --git a/modules/server/default.nix b/modules/server/default.nix index fe2e21c4..464680c0 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -12,6 +12,7 @@ in { ./media ./fedi ./ddns.nix + ./ddclient.nix ]; options.void.server = { isServer = mkEnableOption false; };