modules/system/common: Disable yama security for interactive machines
This commit is contained in:
parent
acea41c22e
commit
40cc61c620
2 changed files with 24 additions and 0 deletions
|
@ -58,6 +58,7 @@ in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(import ./hercules.nix {inherit isLinux;})
|
(import ./hercules.nix {inherit isLinux;})
|
||||||
|
(import ./user.nix {inherit isLinux;})
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
|
|
23
modules/system/common/user.nix
Normal file
23
modules/system/common/user.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{isLinux}: {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
sharedConfig = {};
|
||||||
|
|
||||||
|
linuxConfig = lib.optionalAttrs isLinux {
|
||||||
|
boot.kernel.sysctl."kernel.yama.ptrace_scope" = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
darwinConfig = lib.optionalAttrs (!isLinux) {};
|
||||||
|
|
||||||
|
finalConfig = lib.mkMerge [
|
||||||
|
sharedConfig
|
||||||
|
linuxConfig
|
||||||
|
darwinConfig
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
_file = ./user.nix;
|
||||||
|
|
||||||
|
config = lib.mkIf config.settei.user.enable finalConfig;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue