zammad: init

This commit is contained in:
quitte 2023-11-17 18:18:35 +01:00
parent 65b2bff6b1
commit 8a8af52ec7
3 changed files with 34 additions and 3 deletions

View file

@ -65,6 +65,7 @@
./modules/infoscreen.nix
./modules/manual.nix
./modules/sharepic.nix
./modules/zammad.nix
{
sops.defaultSopsFile = ./secrets/quitte.yaml;
}

29
modules/zammad.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
let
domain = "tickets.${config.networking.domain}";
in
{
services.zammad = {
enable = true;
database = {
createLocally = true;
type = "PostgreSQL";
};
port = 8085;
secretKeyBaseFile = config.sops.secrets."zammad_secret".path;
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.zammad.port}";
};
locations."/ws" = {
proxyPass = "http://localhost:${toString config.services.zammad.websocketPort}";
proxyWebsockets = true;
};
};
sops.secrets."zammad_secret".owner = "zammad";
}

File diff suppressed because one or more lines are too long