From 1b5728b20fdfaddb19e5e35d373a80f51b0863ae Mon Sep 17 00:00:00 2001 From: blake Date: Sun, 5 Oct 2025 15:27:04 -0500 Subject: [PATCH] deciding not to do dockers like this --- modules/homelab/docker/ddns.nix | 91 --------------------------- modules/homelab/docker/dockers.nix | 13 ---- modules/homelab/docker/watchtower.nix | 23 ------- 3 files changed, 127 deletions(-) delete mode 100644 modules/homelab/docker/ddns.nix delete mode 100644 modules/homelab/docker/dockers.nix delete mode 100644 modules/homelab/docker/watchtower.nix diff --git a/modules/homelab/docker/ddns.nix b/modules/homelab/docker/ddns.nix deleted file mode 100644 index 8c60c01..0000000 --- a/modules/homelab/docker/ddns.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options = { - modules.homelab.docker.ddns.enable = lib.mkEnableOption "enable ddns docker"; - }; - - config = lib.mkIf config.modules.homelab.docker.ddns.enable { - let - api_token = builtins.readFile /home/blake/.keyring/ddns/api_token; - zone_id_blakedheld = builtins.readFile /home/blake/.keyring/ddns/zone_id_blakedheld; - zone_id_recoil = builtins.readFile /home/blake/.keyring/ddns/zone_id_recoil; - - # define the config file - ddns_cfg = pkgs.writeText "config.json" '' - { - "cloudflare": [ - { - "authentication": { - "api_token": "${api_token}" - }, - "zone_id": "${zone_id_blakedheld}", - "subdomains": [ - { - "name": "@", - "proxied": true - }, - { - "name": "*", - "proxied": true - }, - { - "name": "git", - "proxied": false - } - - ] - }, - { - "authentication": { - "api_token": "${api_token}" - }, - "zone_id": "${zone_id_recoil}", - "subdomains": [ - { - "name": "@", - "proxied": true - }, - { - "name": "*", - "proxied": true - }, - { - "name": "mc", - "proxied": true - }, - { - "name": "smp", - "proxied": true - }, - { - "name": "superflat", - "proxied": false - }, - { - "name": "skyblock", - "proxied": false - } - ] - } - ], - "a": true, - "aaaa": true, - "purgeUnknownRecords": false - } - ''; - in - { - virtualisation.docker.containers.ddns = { - image = "timothyjmiller/cloudflare-ddns:latest"; - containerName = "ddns"; - restartPolicy = "unless-stopped"; - hostNetwork = true; - environment = { PUID = "1000"; PGID = "1000"; }; - volumes = [ "${ddns_cfg}:/config.json" ]; - securityOpt = [ "no-new-privileges:true" ]; - }; - } - }; -} - diff --git a/modules/homelab/docker/dockers.nix b/modules/homelab/docker/dockers.nix deleted file mode 100644 index 81f4873..0000000 --- a/modules/homelab/docker/dockers.nix +++ /dev/null @@ -1,13 +0,0 @@ - -{ pkgs, config, lib, ... }: - -{ - imports = [ - ./watchtowner.nix - ./ddns.nix - ]; - - modules.homelab.docker.watchtower.enable = lib.mkDefault true; - modules.homelab.docker.ddns.enable = lib.mkDefault false; - -} diff --git a/modules/homelab/docker/watchtower.nix b/modules/homelab/docker/watchtower.nix deleted file mode 100644 index 281ca9d..0000000 --- a/modules/homelab/docker/watchtower.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options = { - modules.homelab.docker.watchtower.enable = lib.mkEnableOption "enable watchtower docker"; - }; - - config = lib.mkIf config.modules.homelab.docker.watchtower.enable { - virtualisation.docker.containers.watchtower = { - image = "containrrr/watchtower"; - containerName = "watchtower"; - restartPolicy = "unless-stopped"; - environment = { - TZ = "America/Chicago"; - WATCHTOWER_INCLUDE_RESTARTING = "America/Chicago"; - WATCHTOWER_CLEANUP = "true"; - WATCHTOWER_POLL_INTERVAL = "43200"; - }; - volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ]; - }; - }; -} -