System hardening
This commit is contained in:
parent
75a9e55876
commit
27c9d479b2
8 changed files with 81 additions and 51 deletions
|
|
@ -152,31 +152,37 @@ with lib; {
|
|||
];
|
||||
};
|
||||
|
||||
fileSystems = mkMerge (mapAttrsToList
|
||||
(dataset: mountpoint: {
|
||||
"${mountpoint}" = {
|
||||
device = "${dataset}";
|
||||
fsType = "zfs";
|
||||
options = [ "X-mount.mkdir" "noatime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
})
|
||||
datasets ++ map
|
||||
(esp: {
|
||||
"/boot/efis/${esp}" = {
|
||||
device = "${devNodes}/${esp}";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
"noatime"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
})
|
||||
efiSystemPartitions);
|
||||
fileSystems = mkMerge
|
||||
(mapAttrsToList
|
||||
(dataset: mountpoint: {
|
||||
"${mountpoint}" = {
|
||||
device = "${dataset}";
|
||||
fsType = "zfs";
|
||||
options = [ "X-mount.mkdir" "noatime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
})
|
||||
datasets ++ map
|
||||
(esp: {
|
||||
"/boot/efis/${esp}" = {
|
||||
device = "${devNodes}/${esp}";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
"noatime"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
})
|
||||
efiSystemPartitions) // {
|
||||
"/proc" = {
|
||||
device = "/proc";
|
||||
options = [ "nosuid" "noexec" "nodev" "hidepid=2" ];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue