service/dyndns: migrate from serverle

This commit is contained in:
Felix Buehler 2023-06-04 17:17:35 +02:00
parent 828a73a0f8
commit 797261aad1
6 changed files with 45 additions and 14 deletions

View file

@ -0,0 +1,34 @@
# running dyndns updates
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.dyndns;
domain = config.networking.domain;
in
{
options.my.services.dyndns = with lib; {
enable = mkEnableOption "Dyndns";
username = mkOption {
type = types.str;
description = "Username for the dyndns.";
example = "admin";
default = "Stunkymonkey-dyndns";
};
passwordFile = mkOption {
type = types.path;
description = "Password for the username for dyndns.";
example = "/run/secrets/freshrss";
};
};
config = lib.mkIf cfg.enable {
services.ddclient = {
enable = true;
server = "dyndns.inwx.com";
username = cfg.username;
passwordFile = cfg.passwordFile;
domains = [ "serverle.${domain}" ];
ipv6 = true;
};
};
}