2022-10-22 19:37:48 +02:00
|
|
|
{ modulesPath, ... }: {
|
2020-12-16 18:57:57 +01:00
|
|
|
imports = [
|
2022-10-22 19:37:48 +02:00
|
|
|
# Source:
|
|
|
|
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/hardened.nix
|
|
|
|
(modulesPath + "/profiles/hardened.nix")
|
2020-12-16 18:57:57 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
## Reset some options set by the hardened profile
|
|
|
|
|
|
|
|
# Needed for sandboxed builds and services
|
|
|
|
security.allowUserNamespaces = true;
|
|
|
|
|
2021-08-05 00:48:56 +02:00
|
|
|
# The "scudo" allocator is broken on NixOS >= 20.09
|
2020-12-16 18:57:57 +01:00
|
|
|
environment.memoryAllocator.provider = "libc";
|
|
|
|
}
|