♻️ Migrate and refactor all v1 services, Add atticd service and cleanup

This commit is contained in:
Jo 2025-05-25 19:09:33 +02:00
parent 76489651f1
commit e45cfc0fbc
24 changed files with 592 additions and 20 deletions

View file

@ -0,0 +1,34 @@
{
lib,
self,
config,
...
}: let
inherit (lib) mkEnableOption mkIf types;
inherit (self) namespace;
inherit (self.lib) mkOpt;
cfg = config.${namespace}.services.duckdns;
in {
options.${namespace}.services.duckdns = {
enable = mkEnableOption "DuckDNS, the dynamic dns service. Will periodically refresh your IP.";
sopsFile = mkOpt types.str null "The location of the sops secret file for the DuckDNS service.";
sopsFormat = mkOpt types.str null "The format of the sops secret file for the DuckDNS service.";
};
config = mkIf cfg.enable {
sops.secrets.duckdns = {
sopsFile = cfg.sopsFile;
format = cfg.sopsFormat;
};
virtualisation.oci-containers.containers.duckdns = {
image = "lscr.io/linuxserver/duckdns:latest";
autoStart = true;
hostname = config.networking.hostname;
environmentFiles = [
config.sops.secrets.duckdns.path
];
};
};
}