From d61e6f8b9cdd557b400e6363903e5dc7f5351bdb Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Tue, 24 Mar 2026 11:29:21 +0100 Subject: [PATCH] Services: Use common dockerhub login --- system/services/0_TEMPLATE.nix | 10 ++------- system/services/adguard.nix | 10 ++------- system/services/authelia.nix | 10 ++------- system/services/bazarr.nix | 10 ++------- system/services/box.nix | 10 ++------- system/services/comfyui.nix | 10 ++------- system/services/fileflows-node.nix | 10 ++------- system/services/fileflows.nix | 10 ++------- system/services/gitea.nix | 28 ++++--------------------- system/services/immich.nix | 10 ++------- system/services/jellyfin.nix | 10 ++------- system/services/kopia.nix | 10 ++------- system/services/nextcloud.nix | 28 ++++--------------------- system/services/nginx-proxy-manager.nix | 10 ++------- system/services/paperless.nix | 28 ++++--------------------- system/services/plex.nix | 10 ++------- system/services/portainer-agent.nix | 10 ++------- system/services/portainer.nix | 10 ++------- system/services/prowlarr.nix | 10 ++------- system/services/pulse.nix | 10 ++------- system/services/radarr.nix | 10 ++------- system/services/sabnzbd-movies.nix | 10 ++------- system/services/sabnzbd-shows.nix | 10 ++------- system/services/sonarr.nix | 10 ++------- system/services/teamspeak.nix | 10 ++------- system/services/tinymediamanager.nix | 10 ++------- system/services/whats-up-docker.nix | 10 ++------- 27 files changed, 60 insertions(+), 264 deletions(-) diff --git a/system/services/0_TEMPLATE.nix b/system/services/0_TEMPLATE.nix index 3a20ed88..ac4ea8d7 100644 --- a/system/services/0_TEMPLATE.nix +++ b/system/services/0_TEMPLATE.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -16,14 +17,7 @@ in { image = "TEMPLATE:${TEMPLATEVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/adguard.nix b/system/services/adguard.nix index 623baa90..07f09c3e 100644 --- a/system/services/adguard.nix +++ b/system/services/adguard.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "adguard/adguardhome:${adguardVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/authelia.nix b/system/services/authelia.nix index 910f8948..b8a1e13b 100644 --- a/system/services/authelia.nix +++ b/system/services/authelia.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "authelia/authelia:${autheliaVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/bazarr.nix b/system/services/bazarr.nix index 4796d21a..db334630 100644 --- a/system/services/bazarr.nix +++ b/system/services/bazarr.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/bazarr:${bazarrVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/box.nix b/system/services/box.nix index 7c427957..f148a465 100644 --- a/system/services/box.nix +++ b/system/services/box.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "stashapp/stash:${boxVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/comfyui.nix b/system/services/comfyui.nix index e1b004bc..cbe22dc4 100644 --- a/system/services/comfyui.nix +++ b/system/services/comfyui.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -12,14 +13,7 @@ in { image = "yanwk/comfyui-boot:${comfyuiVersion}"; autoStart = false; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/fileflows-node.nix b/system/services/fileflows-node.nix index b59cce72..97299af3 100644 --- a/system/services/fileflows-node.nix +++ b/system/services/fileflows-node.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "revenz/fileflows:${fileflowsVersion}"; autoStart = false; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/fileflows.nix b/system/services/fileflows.nix index 59e9e204..733da925 100644 --- a/system/services/fileflows.nix +++ b/system/services/fileflows.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "revenz/fileflows:${version}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/gitea.nix b/system/services/gitea.nix index eeacd70d..4f3962ab 100644 --- a/system/services/gitea.nix +++ b/system/services/gitea.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -27,14 +28,7 @@ in { image = "postgres:14"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; @@ -59,14 +53,7 @@ in { image = "gitea/gitea:${giteaVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ "gitea-db" @@ -107,14 +94,7 @@ in { image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ "gitea" diff --git a/system/services/immich.nix b/system/services/immich.nix index d7c4015a..f0a6884e 100644 --- a/system/services/immich.nix +++ b/system/services/immich.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -39,14 +40,7 @@ in { image = "redis"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/jellyfin.nix b/system/services/jellyfin.nix index a9d3dae9..eb14e982 100644 --- a/system/services/jellyfin.nix +++ b/system/services/jellyfin.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/jellyfin:${jellyfinVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ # "pihole" diff --git a/system/services/kopia.nix b/system/services/kopia.nix index e0b73a4a..c495ca73 100644 --- a/system/services/kopia.nix +++ b/system/services/kopia.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -18,14 +19,7 @@ in { image = "kopia/kopia:${kopiaVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/nextcloud.nix b/system/services/nextcloud.nix index 47e0f2d6..c4ac87bf 100644 --- a/system/services/nextcloud.nix +++ b/system/services/nextcloud.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -33,14 +34,7 @@ in { image = "postgres:alpine"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; @@ -67,14 +61,7 @@ in { image = "redis:alpine"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; @@ -97,14 +84,7 @@ in { image = "nextcloud:${nextcloudVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ "nextcloud-db" diff --git a/system/services/nginx-proxy-manager.nix b/system/services/nginx-proxy-manager.nix index a6e50296..6ca65720 100644 --- a/system/services/nginx-proxy-manager.nix +++ b/system/services/nginx-proxy-manager.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "jc21/nginx-proxy-manager:${nginxVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/paperless.nix b/system/services/paperless.nix index 55c229b5..84dd74d3 100644 --- a/system/services/paperless.nix +++ b/system/services/paperless.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -16,14 +17,7 @@ in { image = "flor1der/paperless-nextcloud-sync:${paperlessNCVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; @@ -59,14 +53,7 @@ in { image = "redis:7"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; @@ -87,14 +74,7 @@ in { image = "postgres:15"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/plex.nix b/system/services/plex.nix index ba76d4b4..34d5c872 100644 --- a/system/services/plex.nix +++ b/system/services/plex.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "plexinc/pms-docker:${plexVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ # "pihole" diff --git a/system/services/portainer-agent.nix b/system/services/portainer-agent.nix index 64ed9f8b..da31f4eb 100644 --- a/system/services/portainer-agent.nix +++ b/system/services/portainer-agent.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -13,14 +14,7 @@ in { image = "portainer/agent:${portainerVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/portainer.nix b/system/services/portainer.nix index 5b80f71f..b278b016 100644 --- a/system/services/portainer.nix +++ b/system/services/portainer.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -12,14 +13,7 @@ in { image = "portainer/portainer-ce:${portainerVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/prowlarr.nix b/system/services/prowlarr.nix index 5c1bdec0..113686a0 100644 --- a/system/services/prowlarr.nix +++ b/system/services/prowlarr.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/prowlarr:${prowlarrVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/pulse.nix b/system/services/pulse.nix index d97e22a1..1e8c9869 100644 --- a/system/services/pulse.nix +++ b/system/services/pulse.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "rcourtman/pulse:${pulseVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/radarr.nix b/system/services/radarr.nix index b776ea46..b2715c19 100644 --- a/system/services/radarr.nix +++ b/system/services/radarr.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/radarr:${radarrVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/sabnzbd-movies.nix b/system/services/sabnzbd-movies.nix index fd03b4bb..43a6b9b1 100644 --- a/system/services/sabnzbd-movies.nix +++ b/system/services/sabnzbd-movies.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/sabnzbd:${sabnzbdVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/sabnzbd-shows.nix b/system/services/sabnzbd-shows.nix index 463ea193..6975cd3f 100644 --- a/system/services/sabnzbd-shows.nix +++ b/system/services/sabnzbd-shows.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/sabnzbd:${sabnzbdVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/sonarr.nix b/system/services/sonarr.nix index 5ef8efdf..63f00675 100644 --- a/system/services/sonarr.nix +++ b/system/services/sonarr.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "linuxserver/sonarr:${sonarrVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/teamspeak.nix b/system/services/teamspeak.nix index 8e7a47e3..540dbadc 100644 --- a/system/services/teamspeak.nix +++ b/system/services/teamspeak.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "teamspeaksystems/teamspeak6-server:${teamspeakVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/tinymediamanager.nix b/system/services/tinymediamanager.nix index 89c5f485..20ff90d2 100644 --- a/system/services/tinymediamanager.nix +++ b/system/services/tinymediamanager.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "tinymediamanager/tinymediamanager:${version}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = []; diff --git a/system/services/whats-up-docker.nix b/system/services/whats-up-docker.nix index 4722fcf3..03d421d4 100644 --- a/system/services/whats-up-docker.nix +++ b/system/services/whats-up-docker.nix @@ -1,4 +1,5 @@ { + mylib, config, lib, pkgs, @@ -11,14 +12,7 @@ in { image = "getwud/wud:${wudVersion}"; autoStart = true; - login = { - # Uses DockerHub by default - # registry = ""; - - # DockerHub Credentials - username = "christoph.urlacher@protonmail.com"; - passwordFile = "${config.sops.secrets.docker-password.path}"; - }; + login = mylib.containers.mkDockerLogin config; dependsOn = [ # "pihole"