aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/root-in-sandbox/default.nix
blob: 110d83f863af95863877d25396fd9b3d4d72f5f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let
  inherit (import ../util.nix) mkNixBuildTest;
in mkNixBuildTest {
  name = "root-in-sandbox";
  extraMachineConfig = { pkgs, ... }: {
    security.wrappers.ohno = {
      owner = "root";
      group = "root";
      setuid = true;
      source = "${pkgs.coreutils}/bin/whoami";
    };
    nix.settings.extra-sandbox-paths = ["/run/wrappers/bin"];
  };
  expressionFile = ./package.nix;
}