mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
nixos/hardened: simplify script
This commit is contained in:
parent
84bd2f4ab0
commit
15a4f9d8ef
@ -21,15 +21,15 @@ with lib;
|
||||
description = "Disable kernel module loading";
|
||||
|
||||
wantedBy = [ config.systemd.defaultUnit ];
|
||||
after = [ "systemd-udev-settle.service" "firewall.service" "systemd-modules-load.service" ] ++ wantedBy;
|
||||
|
||||
script = "echo -n 1 > /proc/sys/kernel/modules_disabled";
|
||||
after = [ "systemd-udev-settle.service" "firewall.service" "systemd-modules-load.service" ] ++ wantedBy;
|
||||
|
||||
unitConfig.ConditionPathIsReadWrite = "/proc/sys/kernel";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "/bin/sh -c 'echo -n 1 >/proc/sys/kernel/modules_disabled'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user