From a4d0c01066968a19fc3bee39a6b751ac023c4b04 Mon Sep 17 00:00:00 2001 From: Antonio Gurgel Date: Thu, 23 Nov 2023 12:15:18 -0800 Subject: [PATCH] Add more services --- releases/svc/jellyfin/default.nix | 4 +--- releases/svc/nextcloud/default.nix | 17 +++++++++++++++++ releases/svc/registry-ui/default.nix | 12 ++++++++++++ releases/svc/syncthing/default.nix | 20 ++++++++++++++++++++ releases/svc/vaultwarden/default.nix | 12 ++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 releases/svc/nextcloud/default.nix create mode 100644 releases/svc/registry-ui/default.nix create mode 100644 releases/svc/syncthing/default.nix create mode 100644 releases/svc/vaultwarden/default.nix diff --git a/releases/svc/jellyfin/default.nix b/releases/svc/jellyfin/default.nix index 638f6c4..4ace867 100644 --- a/releases/svc/jellyfin/default.nix +++ b/releases/svc/jellyfin/default.nix @@ -29,9 +29,7 @@ in { }; }; - defaultPodOptions = { - nodeSelector."kubernetes.io/hostname" = "losangeles"; - }; + defaultPodOptions.nodeSelector."kubernetes.io/hostname" = "losangeles"; persistence = { config = { diff --git a/releases/svc/nextcloud/default.nix b/releases/svc/nextcloud/default.nix new file mode 100644 index 0000000..58e450d --- /dev/null +++ b/releases/svc/nextcloud/default.nix @@ -0,0 +1,17 @@ +{lib, ...}: { + builder = lib.eureka.appTemplate; + args = { + mainImage = "nextcloud:27.0.0"; + httpPort = 80; + + extraValues = { + controllers.main.type = "statefulset"; + persistence.data = { + type = "hostPath"; + hostPath = "/zpool/svc/nextcloud"; + mountPath = "/var/www/html"; + }; + defaultPodOptions.nodeSelector."kubernetes.io/hostname" = "losangeles"; + }; + }; +} diff --git a/releases/svc/registry-ui/default.nix b/releases/svc/registry-ui/default.nix new file mode 100644 index 0000000..758a001 --- /dev/null +++ b/releases/svc/registry-ui/default.nix @@ -0,0 +1,12 @@ +{lib, ...}: { + builder = lib.eureka.appTemplate; + args = { + mainImage = "joxit/docker-registry-ui:2.5.2"; + httpPort = 80; + extraValues.controllers.main.containers.main.env = { + NGINX_PROXY_PASS_URL = "http://registry-private.svc.svc:5000"; + REGISTRY_TITLE = "Eureka"; + SINGLE_REGISTRY = true; + }; + }; +} diff --git a/releases/svc/syncthing/default.nix b/releases/svc/syncthing/default.nix new file mode 100644 index 0000000..02ddae0 --- /dev/null +++ b/releases/svc/syncthing/default.nix @@ -0,0 +1,20 @@ +{lib, ...}: { + builder = lib.eureka.appTemplate; + args = { + mainImage = "lscr.io/linuxserver/syncthing:1.23.4"; + httpPort = 8384; + + extraValues = { + controllers.main.type = "statefulset"; + controllers.main.containers.main.env = with lib.eureka.vars; { + PGID = usersGroup; + PUID = nfsID; + TZ = timeZone; + }; + persistence = { + config = lib.app-template.mkExistingClaim "svc" "syncthing/config"; + data = lib.app-template.mkExistingClaim "svc" "syncthing/data"; + }; + }; + }; +} diff --git a/releases/svc/vaultwarden/default.nix b/releases/svc/vaultwarden/default.nix new file mode 100644 index 0000000..815e55f --- /dev/null +++ b/releases/svc/vaultwarden/default.nix @@ -0,0 +1,12 @@ +{lib, ...}: { + builder = lib.eureka.appTemplate; + args = { + mainImage = "vaultwarden/server:1.29.1"; + httpPort = 80; + + extraValues = { + controllers.main.type = "statefulset"; + persistence.data = lib.app-template.mkExistingClaim "svc" "vaultwarden"; + }; + }; +}