nixconf/systems/x86_64-linux/mikenike/hardware.nix

60 lines
1.8 KiB
Nix

{
config,
lib,
modulesPath,
pkgs,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"nvme" "xhci_pci" "usb_storage" "sd_mod"
"aesni_intel" "cryptd" "usbhid"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
hardware.firmware = [ pkgs.wireless-regdb ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/864a8b53-a9d9-49a7-b9f7-66960ec26869";
fsType = "btrfs";
options = [ "subvol=rootfs" ];
};
boot.initrd.luks.devices."cryptdisk".device = "/dev/disk/by-uuid/ae97e0ad-e489-4207-b8f4-c54bdfa9f576";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C907-68BE";
fsType = "vfat";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/864a8b53-a9d9-49a7-b9f7-66960ec26869";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/864a8b53-a9d9-49a7-b9f7-66960ec26869";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4da92e03-b91c-421c-8c8c-2780c512a664"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}