fix 'hardened' profile for NixOS 20.09
The 'scudo' memory allocator set by the 'hardened' profile breaks some services on 20.09. The fix for NixOS unstable (https://github.com/NixOS/nixpkgs/pull/104052) is ineffective on 20.09. As a workaround, add a custom 'hardened' preset that uses the default allocator.
This commit is contained in:
parent
44b06aea5a
commit
c8e73c959e
2 changed files with 15 additions and 6 deletions
14
modules/presets/hardened.nix
Normal file
14
modules/presets/hardened.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
imports = [
|
||||
# Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/hardened.nix
|
||||
<nixpkgs/nixos/modules/profiles/hardened.nix>
|
||||
];
|
||||
|
||||
## Reset some options set by the hardened profile
|
||||
|
||||
# Needed for sandboxed builds and services
|
||||
security.allowUserNamespaces = true;
|
||||
|
||||
# The "scudo" allocator is broken on NixOS 20.09
|
||||
environment.memoryAllocator.provider = "libc";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue