{ lib, config, pkgs, ... }: let cfg = config.my.networking.ddclient; in { options.my.networking.ddclient = { enable = lib.mkEnableOption "Enable DDClient dynamic DNS client"; configFile = lib.mkOption { type = lib.types.path; default = "/etc/ddclient/ddclient.conf"; description = "Path to the ddclient configuration file (use agenix path)"; }; }; config = lib.mkIf cfg.enable { services.ddclient = { enable = true; configFile = cfg.configFile; }; }; }