feat(modules): add duckdns service

This commit is contained in:
Jo 2024-09-25 23:08:08 +02:00
parent 8f1732d205
commit 19537570aa
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{
lib,
namespace,
config,
host,
...
}: with lib; with lib.${namespace};
let
cfg = config.${namespace}.services.duckdns;
in {
options.${namespace}.services.duckdns = {
enable = mkEnableOption "Enable DuckDNS, the dynamic dns service. Will periodically refresh your IP.";
};
config = mkIf cfg.enable {
sops.secrets.duckdns = {
sopsFile = lib.snowfall.fs.get-file "secrets/duckdns.service.env";
format = "dotenv";
};
virtualisation.oci-containers.containers.duckdns = {
image = "lscr.io/linuxserver/duckdns:latest";
autoStart = true;
hostname = host;
environmentFiles = [
config.sops.secrets.duckdns.path
];
};
};
}

View file

@ -0,0 +1,14 @@
PUID=ENC[AES256_GCM,data:bNWr3Q==,iv:zUEGwd7ZNy/sfGmrT8bHVfkb7Zybe6s7NNPkCCn2dns=,tag:TyyuF28Ln4lk2StiP4tyNA==,type:str]
PGID=ENC[AES256_GCM,data:gqFIzA==,iv:Z14/YwAjpS9JUlpXQa2oNGnAGviqQ8Kx+zv/qdyEm8k=,tag:cGjR7py6dpIJSCot4mrwoA==,type:str]
TZ=ENC[AES256_GCM,data:k5lFLLVfAb9e9Dx76w==,iv:XPxFw5O8PtfV2YRWdVowvF7kPc8ZLDyppL6V5Ni33vk=,tag:xuHTleOmEpwwK35hlZXBrw==,type:str]
SUBDOMAINS=ENC[AES256_GCM,data:/S9njZeMpg5If3DXnAosflsq,iv:+27weaPfYLPo07J+kQiJrmmPYRUjiNKOy0tEhEMx9GA=,tag:kF+eaUveyoAqKwWr/eb7hg==,type:str]
TOKEN=ENC[AES256_GCM,data:cVFxL3rtKl9Qr7BoAkd4p2wMRF4uK4lXAq7Z25tbPRzeo25R,iv:IKIh4KTRhPECn35rRVhDoHMMKdKNBOmr2b4K0ZsdLy0=,tag:SkiEoqeWy2/lfg/qtXynCw==,type:str]
LOG_FILE=ENC[AES256_GCM,data:QCv6hLM=,iv:vn6dedbExEliAOHx5L8UCTaxzQNCdrBlwSQIpaQIa8k=,tag:SP3ItrArT7fnHPo4aF3mTw==,type:str]
sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwM2ozVmZFY0ZIRHhHSS93\nU0FSdGswdU0ydW1uMndJam1rVE9ibXVIQ21nCjZSMjQ4MGJuclJrN3VXNk5POWhE\nRXM3a2FjM3Y3SGozMnUxQ043MWdCZTQKLS0tIDBEQ25WalJpUTVLZ0wvK0FXK1hw\nQXhnTzEzZ2RJTldkdkVWZGJDYy9QMHMKyt6bU1cnoGGeAzo/TNEbI4JyZQW4P5Li\nNDTSEaxweY5g0UieQ8Flff/xae6GN+1yL55hWbaDqOugqvw10CWfPA==\n-----END AGE ENCRYPTED FILE-----\n
sops_age__list_0__map_recipient=age1gudgza8lv02nwec0pejqpp5t7zu0tzjsfkmvgvy3ckfscr9f4qrq2sl5dv
sops_age__list_1__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKV3RLZmQ4eXg2dzFKeGRz\nQnp5YUthbXlIb1o5RkN1ZlBLdjZlbEljdUJFCjM4T1N6SlpDNzBSd0ZnOXp6MWxW\nZ2RMTTgvNEFYRmtzRnFLSTlWdlNRTm8KLS0tIHdGWC9rZlRuTWUzOHRKaVVNSnFp\nNVQrQ2JQc3BNMlBqRnhtcURBRkxBNkUKmbcK8z+/4rJqHmmWANc3ZsmaeLWBV7v+\nXMspUQKlZaAfqtw4fKrr2ocyPoIgZlFYN9GmD0jR9tK3Nm96KxgXXA==\n-----END AGE ENCRYPTED FILE-----\n
sops_age__list_1__map_recipient=age1qcjcwh9tq8pzf2yr7m3hm2n3n3y5rlc30fpkr0eytju9w57ucgcsgcy79d
sops_lastmodified=2024-09-25T21:04:04Z
sops_mac=ENC[AES256_GCM,data:sMyMw9qUl6twGdq0J6gHqroRzzBUFK1lHd80IQtatwPp4S5ywsJpqMxEWy3qtL2+Zl1nGCOHoUgke0EBdu8H6Duj9YhDuc8RCIGIkJcDmpVameo/P9hK4pIsCHN8SRB6m2DIgViKaEJNZpFArhCAJjTfJX/8NXX1R5CWakjYCqM=,iv:KfdajXnDyKevtROuTJlswO1Wj3TxaWdASaUHSUMBIgc=,tag:HEBE+NLNm6UavU7GYxkoZA==,type:str]
sops_unencrypted_suffix=_unencrypted
sops_version=3.9.0