diff --git a/nix/os/modules/ddclient-ovh.nix b/nix/os/modules/ddclient-ovh.nix new file mode 100644 index 0000000..43d9c1c --- /dev/null +++ b/nix/os/modules/ddclient-ovh.nix @@ -0,0 +1,30 @@ +{ lib +, config +, ... }: + +let + cfg = config.services.ddclientovh; + + passwords = import ../../variables/passwords.crypt.nix; + +in { + + options.services.ddclientovh = with lib; { + enable = mkEnableOption "Enable ddclient-ovh"; + domain = mkOption { + type = types.string; + }; + }; + + config = lib.mkIf cfg.enable { + services.ddclient = { + enable = true; + protocol = "dyndns2"; + server = "www.ovh.com"; + ssl = true; + domains = [ cfg.domain ]; + use = "web, web=ifconfig.co"; + inherit (passwords.dyndns.${cfg.domain}) username password; + }; + }; +}