mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44: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
|
@ -3,7 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disks.nix
|
./disks.nix
|
||||||
./dyndns.nix
|
|
||||||
./network.nix
|
./network.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.ddclient = {
|
|
||||||
enable = true;
|
|
||||||
server = "dyndns.inwx.com";
|
|
||||||
username = "Stunkymonkey-dyndns";
|
|
||||||
passwordFile = "/root/.dyndns_password";
|
|
||||||
domains = [ "serverle.stunkymonkey.de" ];
|
|
||||||
ipv6 = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -16,6 +16,8 @@ sso:
|
||||||
totp-secret: ENC[AES256_GCM,data:J60zceMAWdUuUIHyV57mcEatt5zhbMatvL+Z0NBoEJyDG2u9MornLJju/+AoBUq/erbY4Z/ymlI=,iv:kUBIGMy1yDQ8Vc6GvxmGGqgQ341Lfvmq+Q/DCTHiT0k=,tag:fzCvUmnKuioArq7ObFwDUA==,type:str]
|
totp-secret: ENC[AES256_GCM,data:J60zceMAWdUuUIHyV57mcEatt5zhbMatvL+Z0NBoEJyDG2u9MornLJju/+AoBUq/erbY4Z/ymlI=,iv:kUBIGMy1yDQ8Vc6GvxmGGqgQ341Lfvmq+Q/DCTHiT0k=,tag:fzCvUmnKuioArq7ObFwDUA==,type:str]
|
||||||
acme:
|
acme:
|
||||||
inwx: ENC[AES256_GCM,data:yf1Xi0YOSUMfTd91NCjMUD7uMPzFjK7wfsxnDeIXBfd1U0hopemF6KBDYVLIP7NrTDz+wGWCqvgO3w8FjfWjCgtcqw==,iv:4HOFyvuhCDTSFGgEqbdVmC8pDpf/CpapDaSUwwRZOGI=,tag:ynQxQS1VzpqCJZOfUP0Bwg==,type:str]
|
inwx: ENC[AES256_GCM,data:yf1Xi0YOSUMfTd91NCjMUD7uMPzFjK7wfsxnDeIXBfd1U0hopemF6KBDYVLIP7NrTDz+wGWCqvgO3w8FjfWjCgtcqw==,iv:4HOFyvuhCDTSFGgEqbdVmC8pDpf/CpapDaSUwwRZOGI=,tag:ynQxQS1VzpqCJZOfUP0Bwg==,type:str]
|
||||||
|
dyndns:
|
||||||
|
password: ENC[AES256_GCM,data:WsgT4Un6/yirszfONzhYQDT66arEdmzkeA==,iv:9IbyEwX8DvJMfW3XaUaObmsD8mZCr1eQo7MglGn8dl0=,tag:XM0Qf4KbdkercBvpEwJdtg==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -40,8 +42,8 @@ sops:
|
||||||
a1BjcjVaM01UV0o5bTFTVTE5QUZKMmsKPAGYDf1FVtp4+Z/KUrI6z0aZYEwN1DYa
|
a1BjcjVaM01UV0o5bTFTVTE5QUZKMmsKPAGYDf1FVtp4+Z/KUrI6z0aZYEwN1DYa
|
||||||
jKtA1IUXrmdaRllN0SfC+YjMXTk7IoJvrjagCv9Zo0zEKasfO8PL4g==
|
jKtA1IUXrmdaRllN0SfC+YjMXTk7IoJvrjagCv9Zo0zEKasfO8PL4g==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2023-02-21T22:00:55Z"
|
lastmodified: "2023-06-04T14:25:20Z"
|
||||||
mac: ENC[AES256_GCM,data:pdoMUpMymTqJJ2GSjtu8PTsF8xx10mY7bTunpRdk2YJOtaes2urYWdH7jmX3NszqYeD0cY8KWAVgOgQxdGI1PW9uy+Xt7aiYDeaxDoYo2yot+5zj8lyV/ncAPRDEn5exGi7AmbJh6Wo84aS27AhMGC6KSJfRQx/uZMQqIvxFQlw=,iv:pexQtkKgjoBJnZMsR16hCc2hhaIo7TsezKgx2if3Wwo=,tag:3eTABZYlb+hh17EmhRBspg==,type:str]
|
mac: ENC[AES256_GCM,data:vHbLSsIFoathXRhvEIlJZyPQr/nKguel72hiaCP0Z/jjrtr+2imFWTPzi4BxRIHJwybITh59ytxDBm3cxXuN0GbBsSVHjYAp5oLqiQHWyjWQsJpE8ITP/0W61lNGeVAzixntgz/QJKqavXs0duEDSqqw+7+fULo6Xzx794vnY1M=,iv:MTpTnDRRhPnV2e6xX42juXciWIbYtbIzy6GC+aYj9Gc=,tag:8e3uGqwW2CZnrQartHb5DQ==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.7.3
|
version: 3.7.3
|
||||||
|
|
|
@ -7,6 +7,7 @@ in
|
||||||
sops.secrets."acme/inwx" = { };
|
sops.secrets."acme/inwx" = { };
|
||||||
sops.secrets."borgbackup/password" = { };
|
sops.secrets."borgbackup/password" = { };
|
||||||
sops.secrets."borgbackup/ssh_key" = { };
|
sops.secrets."borgbackup/ssh_key" = { };
|
||||||
|
sops.secrets."dyndns/password" = { };
|
||||||
sops.secrets."sso/auth-key" = { };
|
sops.secrets."sso/auth-key" = { };
|
||||||
sops.secrets."sso/felix/password-hash" = { };
|
sops.secrets."sso/felix/password-hash" = { };
|
||||||
sops.secrets."sso/felix/totp-secret" = { };
|
sops.secrets."sso/felix/totp-secret" = { };
|
||||||
|
@ -20,6 +21,11 @@ in
|
||||||
sshKeyFile = secrets."borgbackup/ssh_key".path;
|
sshKeyFile = secrets."borgbackup/ssh_key".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dyndns = {
|
||||||
|
enable = true;
|
||||||
|
passwordFile = secrets."dyndns/password".path;
|
||||||
|
};
|
||||||
|
|
||||||
prowlarr = {
|
prowlarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
./backup
|
./backup
|
||||||
./bazarr
|
./bazarr
|
||||||
./blocky
|
./blocky
|
||||||
|
./dyndns
|
||||||
./freshrss
|
./freshrss
|
||||||
./gitea
|
./gitea
|
||||||
./grafana
|
./grafana
|
||||||
|
|
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