- increase security by restricting /boot to root only - add data-drives for encrypted drives that will get mounted through crypttab rather than the initrd Reviewed-on: #87 Co-authored-by: aaron <aaron@0x29a.ch>
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||
# and may be overwritten by future invocations. Please make changes
|
||
# to /etc/nixos/configuration.nix instead.
|
||
{
|
||
config,
|
||
lib,
|
||
pkgs,
|
||
modulesPath,
|
||
...
|
||
}:
|
||
|
||
{
|
||
imports = [
|
||
(modulesPath + "/installer/scan/not-detected.nix")
|
||
];
|
||
|
||
boot.initrd.availableKernelModules = [
|
||
"xhci_pci"
|
||
"thunderbolt"
|
||
"nvme"
|
||
"usb_storage"
|
||
"sd_mod"
|
||
];
|
||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||
boot.initrd.luks.devices."cryptroot" = {
|
||
device = "/dev/disk/by-label/nixcrypt";
|
||
allowDiscards = true;
|
||
bypassWorkqueues = true;
|
||
};
|
||
|
||
boot.kernelModules = [ "kvm-intel" ];
|
||
boot.extraModulePackages = [ ];
|
||
|
||
fileSystems."/" = {
|
||
device = "/dev/disk/by-label/nixroot";
|
||
fsType = "ext4";
|
||
};
|
||
|
||
fileSystems."/boot" = {
|
||
device = "/dev/disk/by-label/nixboot";
|
||
fsType = "vfat";
|
||
options = [
|
||
"fmask=0077"
|
||
"dmask=0077"
|
||
];
|
||
};
|
||
|
||
fileSystems."/home" = {
|
||
device = "/dev/disk/by-label/nixhome";
|
||
fsType = "ext4";
|
||
};
|
||
|
||
swapDevices = [
|
||
{ device = "/dev/disk/by-label/nixswap"; }
|
||
];
|
||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||
hardware.cpu.intel.npu.enable = true;
|
||
}
|