os/system/lime/hardware-configuration.nix

61 lines
2 KiB
Nix
Raw Normal View History

# 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" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.loader.grub = {
efiSupport = true;
device = "nodev";
enable = true;
};
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXOS-ROOT";
fsType = "btrfs";
};
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/bd5edcc6-35b7-4829-901f-8593c16f0324";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2745-1284";
fsType = "vfat";
};
swapDevices = [
{
device = "/swap/swapfile";
size = 16*1024;
}
];
# Hibernation
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
boot.resumeDevice = "/dev/disk/by-label/NIXOS-ROOT";
boot.kernelParams = [
# btrfs inspect-internal map-swapfile -r /swap/swapfile
"resume_offset=2630912"
];
# 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;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.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;
}