hermitcollective-nix-server/services/cerca.nix

28 lines
947 B
Nix

{ pkgs, ... }:
{
users.groups.cerca = {};
users.users.cerca = {
group = "cerca";
isSystemUser = true;
createHome = false;
home = "/var/www/forum.hermitcollective.net/";
};
systemd.services.cerca = {
enable = true;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
description = "The HermitCollective game developer forum";
serviceConfig = {
Type = "simple";
User = "cerca";
WorkingDirectory = "/var/www/forum.hermitcollective.net/";
ExecStart = "${pkgs.cerca}/bin/cerca --config /var/www/forum.hermitcollective.net/cerca.toml --data /var/www/forum.hermitcollective.net/data --authkey 3330219fde5793b15c57fd58df60a39c3497d64192c68ab9356ddaeb07e5e20e";
};
};
# Reqeusts SSL and adds the site to nginx
services.nginx.virtualHosts."forum.hermitcollective.net" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8272";
};
}