mirror of https://gitlab.crans.org/nounous/nixos
38 lines
833 B
Nix
38 lines
833 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
environment.systemPackages = with pkgs; [
|
|
imagemagick # Pour la compression des PDFs
|
|
];
|
|
|
|
services.stirling-pdf = {
|
|
enable = true;
|
|
environment = {
|
|
ENDPOINTS_TOREMOVE = "url-to-pdf";
|
|
UI_APPNAMENAVBAR = "Stirling PDF du Cr@ns";
|
|
SECURITY_ENABLELOGIN = false;
|
|
SERVER_PORT = 8000;
|
|
SYSTEM_DEFAULTLOCALE = "fr-FR";
|
|
SYSTEM_ENABLEDESKTOPINSTALLSLIDE = false;
|
|
SYSTEM_SHOWUPDATE = false;
|
|
};
|
|
};
|
|
|
|
systemd.services.stirling-pdf.serviceConfig = {
|
|
Restart = "always";
|
|
RestartSec = "5s";
|
|
};
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
"pdf.crans.org" = {
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${toString config.services.stirling-pdf.environment.SERVER_PORT}";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|