1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.security.chromiumSuidSandbox;
7 sandbox = pkgs.chromium.sandbox;
8in
9{
10 options.security.chromiumSuidSandbox.enable = mkOption {
11 type = types.bool;
12 default = false;
13 description = ''
14 Whether to install the Chromium SUID sandbox which is an executable that
15 Chromium may use in order to achieve sandboxing.
16
17 If you get the error "The SUID sandbox helper binary was found, but is not
18 configured correctly.", turning this on might help.
19
20 Also, if the URL chrome://sandbox tells you that "You are not adequately
21 sandboxed!", turning this on might resolve the issue.
22
23 Finally, if you have <option>security.grsecurity</option> enabled and you
24 use Chromium, you probably need this.
25 '';
26 };
27
28 config = mkIf cfg.enable {
29 environment.systemPackages = [ sandbox ];
30 security.wrappers."${sandbox.passthru.sandboxExecutableName}".source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}";
31 };
32}