nix/hosts/APPA/hardware.nix

82 lines
1.5 KiB
Nix

{
config,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [
"nomodeset" # otherwise freezes on boot with lid closed
];
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@"
"compress=zstd"
"noatime"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"subvol=@nix"
"compress=zstd"
"noatime"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-label/HOME";
fsType = "btrfs";
options = [
"subvol=@"
"compress=zstd"
"noatime"
];
};
fileSystems."/var/lib" = {
device = "/dev/disk/by-label/HOME";
fsType = "btrfs";
options = [
"subvol=@varlib"
"compress=zstd"
"noatime"
];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}