nixpkgs/nixos/modules/profiles
Emily ad9bfe2254 nixos/hardened: enable user namespaces for root
linux-hardened sets kernel.unprivileged_userns_clone=0 by default; see
anthraxx/linux-hardened@104f44058f.

This allows the Nix sandbox to function while reducing the attack
surface posed by user namespaces, which allow unprivileged code to
exercise lots of root-only code paths and have lead to privilege
escalation vulnerabilities in the past.

We can safely leave user namespaces on for privileged users, as root
already has root privileges, but if you're not running builds on your
machine and really want to minimize the kernel attack surface then you
can set security.allowUserNamespaces to false.

Note that Chrome's sandbox requires either unprivileged CLONE_NEWUSER or
setuid, and Firefox's silently reduces the security level if it isn't
allowed (see about:support), so desktop users may want to set:

    boot.kernel.sysctl."kernel.unprivileged_userns_clone" = true;
2020-04-17 16:13:39 +01:00
..
all-hardware.nix usb-storage -> uas 2018-08-23 01:42:34 +00:00
base.nix Revert "zfs cannot be distributed. Disabling it in the isos." 2018-11-26 17:51:18 -05:00
clone-config.nix ova: add cloneConfigExtra option 2018-10-21 14:52:49 -05:00
demo.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
docker-container.nix use closure-info for building system tarball 2018-11-07 12:52:53 +08:00
graphical.nix nixos/plasma5: drop enableQt4Support option 2019-11-22 09:01:05 +01:00
hardened.nix nixos/hardened: enable user namespaces for root 2020-04-17 16:13:39 +01:00
headless.nix modules/profiles/minimal: sound is disabled by default 2019-01-13 13:47:36 +01:00
installation-device.nix Remove unused 'rogue' service 2020-03-24 15:25:20 +01:00
minimal.nix types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
qemu-guest.nix qemu-guest: allow to override security.rngd 2019-09-18 00:35:04 +09:00