nixos/security/misc: use mkMerge for easier extension

This commit is contained in:
Joachim Fasting
2018-12-27 15:00:46 +01:00
parent 2534dddaa9
commit 9db84f6fcd
+4 -2
View File
@@ -24,7 +24,8 @@ with lib;
}; };
}; };
config = mkIf (!config.security.allowUserNamespaces) { config = mkMerge [
(mkIf (!config.security.allowUserNamespaces) {
# Setting the number of allowed user namespaces to 0 effectively disables # Setting the number of allowed user namespaces to 0 effectively disables
# the feature at runtime. Note that root may raise the limit again # the feature at runtime. Note that root may raise the limit again
# at any time. # at any time.
@@ -35,5 +36,6 @@ with lib;
message = "`nix.useSandbox = true` conflicts with `!security.allowUserNamespaces`."; message = "`nix.useSandbox = true` conflicts with `!security.allowUserNamespaces`.";
} }
]; ];
}; })
];
} }