2022-03-29 11:26:12 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
let
|
|
|
|
|
cfg = config.services.ombi;
|
2022-11-24 18:22:26 +01:00
|
|
|
domain = "ombi.mc-fucker.cool";
|
2022-03-29 11:26:12 +02:00
|
|
|
in
|
2022-03-24 17:20:21 +01:00
|
|
|
{
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs:
|
|
|
|
|
{
|
2022-08-08 20:35:38 +02:00
|
|
|
ombi = pkgs.callPackage ../packages/ombi {};
|
2022-03-24 17:20:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.ombi.enable = true;
|
2022-03-29 11:26:12 +02:00
|
|
|
|
2022-11-24 18:22:26 +01:00
|
|
|
services.nginx.virtualHosts."${domain}" = {
|
2022-03-29 11:26:12 +02:00
|
|
|
forceSSL = true;
|
|
|
|
|
enableACME = true;
|
|
|
|
|
locations = {
|
|
|
|
|
"/" = {
|
|
|
|
|
proxyPass = "http://localhost:5000";
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/api" = {
|
|
|
|
|
proxyPass = "http://localhost:5000";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/swagger" = {
|
|
|
|
|
proxyPass = "http://localhost:5000";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
ssl_session_cache builtin:1000;
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_vary on;
|
|
|
|
|
gzip_min_length 1000;
|
|
|
|
|
gzip_proxied any;
|
|
|
|
|
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
|
|
|
|
|
gzip_disable "MSIE [1-6]\.";
|
2022-11-24 18:22:26 +01:00
|
|
|
access_log /var/log/nginx/${domain}_access.log;
|
|
|
|
|
error_log /var/log/nginx/${domain}_error.log;
|
2022-03-29 11:26:12 +02:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
systemd.services.ombi =
|
|
|
|
|
{
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
ProtectSystem = "full";
|
|
|
|
|
ProtectHostname = "true";
|
|
|
|
|
ProtectClock = "true";
|
|
|
|
|
#WorkingDirectory = cfg.dataDir;
|
|
|
|
|
#StateDirectory = "ombi";
|
|
|
|
|
#RootDirectory = "/run/ombi";
|
|
|
|
|
#RuntimeDirectory = "ombi";
|
|
|
|
|
#BindReadOnlyPaths = builtins.storeDir;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-03-24 17:20:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# vim: set et ts=2 sw=2 ai:
|