mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-10-31 22:00:05 +00:00
✨♻️ Migrate and refactor all v1 services, Add atticd service and cleanup
This commit is contained in:
parent
76489651f1
commit
e45cfc0fbc
24 changed files with 592 additions and 20 deletions
34
modules/nixos/services/duckdns/default.nix
Normal file
34
modules/nixos/services/duckdns/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue