nixos/hosts/vm/livre/stirling.nix

32 lines
729 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;
};
};
services.nginx = {
enable = true;
virtualHosts = {
"pdf.crans.org" = {
locations."/" = {
proxyPass = "http://localhost:${toString config.services.stirling-pdf.environment.SERVER_PORT}";
};
};
};
};
}