nix-config/hosts/desktops/io/hardware-configuration.nix
2024-02-20 17:47:38 -03:00

52 lines
1.5 KiB
Nix

{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
luks.devices."cryptroot".device =
"/dev/disk/by-uuid/37c930c5-2b31-4d18-a1c4-7f13e0412656";
};
kernelModules = [ "kvm-intel" ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by_uuid/1ce9c049-0736-4305b21e-34244004acf50";
fsType = "btrfs";
options = [ "subvol=@root" "noatime" "compress=zstd" ];
};
"/home" = {
device = "/dev/disk/by_uuid/1ce9c049-0736-4305b21e-34244004acf50 ";
fsType = "btrfs";
options = [ "subvol=@home" "noatime" "compress=zstd" ];
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/36B4-C473";
fsType = "vfat";
options = [ "noatime" "fmask=0077" "dmask=0077" ];
};
"/nix" = {
device = "/dev/disk/by_uuid/1ce9c049-0736-4305b21e-34244004acf50 ";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" ];
};
"/persistent" = {
device = "/dev/disk/by_uuid/1ce9c049-0736-4305b21e-34244004acf50 ";
fsType = "btrfs";
options = [ "subvol=@persistent" "noatime" "compress=zstd" ];
};
};
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;
}