nixos/nginx: remove option enableSandbox
This commit is contained in:
parent
940195c0e7
commit
535896671b
|
@ -427,8 +427,8 @@ php.override {
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Add option <literal>services.nginx.enableSandbox</literal> to starting Nginx web server with additional sandbox/hardening options.
|
Nginx web server now starting with additional sandbox/hardening options. By default, write access
|
||||||
By default, write access to <literal>services.nginx.stateDir</literal> is allowed. To allow writing to other folders,
|
to <literal>services.nginx.stateDir</literal> is allowed. To allow writing to other folders,
|
||||||
use <literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal>
|
use <literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
|
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
|
||||||
|
|
|
@ -463,14 +463,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
enableSandbox = mkOption {
|
|
||||||
default = false;
|
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Starting Nginx web server with additional sandbox/hardening options.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "nginx";
|
default = "nginx";
|
||||||
|
@ -728,7 +720,6 @@ in
|
||||||
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" "CAP_SYS_RESOURCE" ];
|
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" "CAP_SYS_RESOURCE" ];
|
||||||
# Security
|
# Security
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
} // optionalAttrs cfg.enableSandbox {
|
|
||||||
# Sandboxing
|
# Sandboxing
|
||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
ProtectHome = mkDefault true;
|
ProtectHome = mkDefault true;
|
||||||
|
|
|
@ -18,7 +18,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
];
|
];
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
services.nginx.package = pkgs.nginx-lua;
|
services.nginx.package = pkgs.nginx-lua;
|
||||||
services.nginx.enableSandbox = true;
|
|
||||||
services.nginx.virtualHosts.localhost = {
|
services.nginx.virtualHosts.localhost = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
location /test1-write {
|
location /test1-write {
|
||||||
|
|
Loading…
Reference in New Issue