From 4d18a49ca1dad7d26795ed77259b4f5e21e35da4 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 28 Apr 2025 15:19:43 +0200 Subject: [PATCH] move some redis servers around --- flake.nix | 4 ++++ modules/authentik/default.nix | 6 +----- modules/mail/rspamd.nix | 1 + modules/zammad.nix | 9 ++++++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 12d466d..0e4f805 100755 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ , vscode-server , course-management , print-interface + , authentik , ... }@inputs: let @@ -75,10 +76,13 @@ ese-manual.nixosModules.default course-management.nixosModules.default vscode-server.nixosModules.default + authentik.nixosModules.default + ./hosts/quitte/configuration.nix ./options ./modules/core + ./modules/authentik ./modules/ldap ./modules/mail ./modules/web diff --git a/modules/authentik/default.nix b/modules/authentik/default.nix index 4267f28..eb65477 100644 --- a/modules/authentik/default.nix +++ b/modules/authentik/default.nix @@ -1,11 +1,8 @@ -{ config, ... }: +{ config, lib, ... }: let domain = "idm.${config.networking.domain}"; in { - age.secrets.authentik-core = { - file = ../../../../secrets/nuc/authentik/core.age; - }; sops.secrets."authentik/env" = { }; services.authentik = { enable = true; @@ -16,5 +13,4 @@ in }; environmentFile = config.sops.secrets."authentik/env".path; }; - } diff --git a/modules/mail/rspamd.nix b/modules/mail/rspamd.nix index 3ec5b3a..cab3fd0 100644 --- a/modules/mail/rspamd.nix +++ b/modules/mail/rspamd.nix @@ -184,6 +184,7 @@ in redis = { vmOverCommit = true; servers.rspamd = { + port = 0; enable = true; }; }; diff --git a/modules/zammad.nix b/modules/zammad.nix index fed019b..cbff484 100644 --- a/modules/zammad.nix +++ b/modules/zammad.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: let domain = "tickets.${config.networking.domain}"; in @@ -9,11 +9,18 @@ in createLocally = true; type = "PostgreSQL"; }; + redis.port = 6380; port = 8085; secretKeyBaseFile = config.sops.secrets."zammad_secret".path; }; + services.redis = { + servers.zammad = { + port = lib.mkForce 6380; + enable = true; + }; + }; # disably spammy logs systemd.services.zammad-web.preStart = '' sed -i -e "s|debug|warn|" ./config/environments/production.rb