mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 12:20:04 +00:00
feat(modules): add duckdns service
This commit is contained in:
parent
8f1732d205
commit
19537570aa
2 changed files with 44 additions and 0 deletions
30
modules/nixos/services/duckdns/default.nix
Normal file
30
modules/nixos/services/duckdns/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue