aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/no-new-privileges/sandbox.nix
blob: e2475555e494ad34aac1312774872cde54b474d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
let
  inherit (import ../util.nix) mkNixBuildTest;
in
mkNixBuildTest {
  name = "no-new-privileges-in-sandbox";
  extraMachineConfig =
    { pkgs, ... }:
    {
      security.wrappers.ohno = {
        owner = "root";
        group = "root";
        capabilities = "cap_sys_nice=eip";
        source = "${pkgs.libcap}/bin/getpcaps";
      };
      nix.settings.extra-sandbox-paths = [ "/run/wrappers/bin/ohno" ];
    };
  expressionFile = ./package.nix;
}