2023-09-06 20:41:18 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-09-05 11:12:45 +02:00
|
|
|
let
|
|
|
|
configFile = config.sops.secrets."isso.conf".path;
|
|
|
|
in {
|
2023-09-06 20:41:18 +02:00
|
|
|
|
2023-09-05 11:12:45 +02:00
|
|
|
sops.secrets."isso.conf" = {
|
|
|
|
owner = "isso";
|
|
|
|
group = "isso";
|
|
|
|
};
|
|
|
|
|
2023-09-06 20:41:18 +02:00
|
|
|
users.users.isso = {
|
|
|
|
group = "isso";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
users.groups.isso = {};
|
|
|
|
|
|
|
|
|
2023-09-05 11:12:45 +02:00
|
|
|
services.isso.enable = true;
|
|
|
|
# override the startup to allow secrets in the configFile
|
|
|
|
# following relevant config is inside:
|
|
|
|
# [general]
|
|
|
|
# dbpath = /var/lib/comments.db
|
|
|
|
# host = https://blog.binaergewitter.de
|
|
|
|
# listen = http://localhost:9292
|
|
|
|
# public-endpoint = https://comments.binaergewitter.de
|
2023-09-06 20:41:18 +02:00
|
|
|
systemd.services.isso.serviceConfig.ExecStart = lib.mkForce "${pkgs.isso}/bin/isso -c ${configFile}" ;
|
|
|
|
systemd.services.isso.serviceConfig.DynamicUser = lib.mkForce false;
|
2023-09-05 11:12:45 +02:00
|
|
|
|
2023-09-06 20:41:18 +02:00
|
|
|
# savarcast is behind traefik, do not configure tls
|
2023-09-05 11:12:45 +02:00
|
|
|
services.nginx.virtualHosts."comments.binaergewitter.de" = {
|
|
|
|
locations."/".proxyPass = "http://localhost:9292";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|