mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/dyndns: migrate from serverle
This commit is contained in:
parent
828a73a0f8
commit
797261aad1
6 changed files with 45 additions and 14 deletions
34
modules/services/dyndns/default.nix
Normal file
34
modules/services/dyndns/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue