diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-12-07 22:57:33 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-12-07 22:57:33 +0300 |
commit | c4273035cf5876e3ba8ed2c6b492d31c2de290ee (patch) | |
tree | 129f1ac3444e30560c44e8ecb32edc29fa07acc9 /modules/apps | |
parent | 697bbb870a033d77bf0f5fc060bb59aab290da6e (diff) | |
download | nixsap-c4273035cf5876e3ba8ed2c6b492d31c2de290ee.tar.gz |
Add the "package" option to the nginx app
Diffstat (limited to 'modules/apps')
-rw-r--r-- | modules/apps/icingaweb2.nix | 2 | ||||
-rw-r--r-- | modules/apps/mediawiki/default.nix | 2 | ||||
-rw-r--r-- | modules/apps/nginx.nix | 11 |
3 files changed, 10 insertions, 5 deletions
diff --git a/modules/apps/icingaweb2.nix b/modules/apps/icingaweb2.nix index 3881b75..5e988b5 100644 --- a/modules/apps/icingaweb2.nix +++ b/modules/apps/icingaweb2.nix @@ -417,7 +417,7 @@ in { location ~ ^/index\.php(.*)$ { fastcgi_pass unix:${config.nixsap.apps.php-fpm.icingaweb2.pool.listen.socket}; fastcgi_index index.php; - include ${pkgs.nginx}/conf/fastcgi_params; + include ${config.nixsap.apps.nginx.package}/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME ${pkgs.icingaweb2}/public/index.php; fastcgi_param ICINGAWEB_CONFIGDIR ${cfg.configDir}; fastcgi_param REMOTE_USER $remote_user; diff --git a/modules/apps/mediawiki/default.nix b/modules/apps/mediawiki/default.nix index 07dc6e9..25b4b9a 100644 --- a/modules/apps/mediawiki/default.nix +++ b/modules/apps/mediawiki/default.nix @@ -216,7 +216,7 @@ let location ~ \.php$ { fastcgi_pass unix:${config.nixsap.apps.php-fpm.mediawiki.pool.listen.socket}; - include ${pkgs.nginx}/conf/fastcgi_params; + include ${config.nixsap.apps.nginx.package}/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } ''; diff --git a/modules/apps/nginx.nix b/modules/apps/nginx.nix index 0709f71..7965c8d 100644 --- a/modules/apps/nginx.nix +++ b/modules/apps/nginx.nix @@ -10,7 +10,7 @@ let mkEnableOption mkIf mkOption ; inherit (lib.types) - attrsOf bool either enum int lines nullOr path str submodule ; + attrsOf bool either enum int lines nullOr package path str submodule ; cfg = config.nixsap.apps.nginx; @@ -53,13 +53,18 @@ let } ''; - exec = "${pkgs.nginx}/bin/nginx -c ${nginx-conf} -p ${cfg.stateDir}"; + exec = "${cfg.package}/bin/nginx -c ${nginx-conf} -p ${cfg.stateDir}"; enabled = {} != explicit cfg.conf.http.servers; in { options.nixsap.apps.nginx = { + package = mkOption { + description = "Nginx package"; + type = package; + default = pkgs.nginx; + }; user = mkOption { description = "User to run as"; type = str; @@ -127,7 +132,7 @@ in { config = { nixsap.apps.nginx.conf.http.context = '' - include ${pkgs.nginx}/conf/mime.types; + include ${cfg.package}/conf/mime.types; default_type application/octet-stream; # This is `combined` format with $remote_user replaced by $http_from. |