1

harden: no extraneous permissions on /root, /var and /etc

This commit is contained in:
Himadri Bhattacharjee
2024-10-02 08:04:33 +05:30
parent f4304f8571
commit ccc54c0263
2 changed files with 33 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
[
./hardware-configuration.nix
./disable-broken-wifi-card.nix
./filesystem-hardening.nix
];
boot = {

View File

@@ -0,0 +1,32 @@
{
fileSystems = {
"/root" = {
device = "/root";
options = [
"bind"
"nosuid"
"noexec"
"nodev"
];
};
"/var" = {
device = "/var";
options = [
"bind"
"nosuid"
"noexec"
"nodev"
];
};
"/etc" = {
device = "/etc";
options = [
"bind"
"nosuid"
"nodev"
];
};
};
}