diff options
Diffstat (limited to 'krebs/3modules/rtorrent.nix')
-rw-r--r-- | krebs/3modules/rtorrent.nix | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/krebs/3modules/rtorrent.nix b/krebs/3modules/rtorrent.nix index 1f88a49e..e5566f32 100644 --- a/krebs/3modules/rtorrent.nix +++ b/krebs/3modules/rtorrent.nix @@ -186,7 +186,7 @@ let }; extraConfig = mkOption { - type = types.string; + type = types.lines; description = '' config to be placed into ${cfg.workDir}/.rtorrent.rc @@ -301,6 +301,7 @@ let default = mkDefault true; inherit (webcfg) basicAuth; root = optionalString rucfg.enable webdir; + listen = [ { inherit (webcfg) addr port; } ]; locations = { "/RPC2".extraConfig = '' @@ -319,15 +320,7 @@ let include ${pkgs.nginx}/conf/fastcgi.conf; ''; } ); - # workaround because upstream nginx api changed - # TODO remove when nobody uses 17.03 anymore - } // (if hasAttr "port" (head options.services.nginx.virtualHosts.type.getSubModules).submodule.options then { - port = webcfg.port; - } else { - listen = [ - { inherit (webcfg) addr port; } - ]; - }); + }; }; rutorrent-imp = { @@ -335,6 +328,8 @@ let pools.rutorrent = { user = nginx-user; group = nginx-group; + phpEnv.PATH = makeBinPath rutorrent-deps; + settings = { "listen.owner" = nginx-user; "pm" = "dynamic"; @@ -342,14 +337,11 @@ let "pm.start_servers" = 2; "pm.min_spare_servers" = 1; "pm.max_spare_servers" = 3; + "chdir" = "/"; + "php_admin_value[error_log]" = "stderr"; + "php_admin_flag[log_errors]" = "on"; + "catch_workers_output" = "yes"; }; - extraConfig = '' - chdir = / - php_admin_value[error_log] = 'stderr' - php_admin_flag[log_errors] = on - catch_workers_output = yes - env[PATH] = ${makeBinPath rutorrent-deps} - ''; }; }; }; |