btw i use nix
1{
2 config,
3 lib,
4 pkgs,
5 modulesPath,
6 ...
7}:
8
9{
10 imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
11
12 boot.initrd.availableKernelModules = [
13 "xhci_pci"
14 "thunderbolt"
15 "nvme"
16 "usbhid"
17 "rtsx_pci_sdmmc"
18 ];
19 boot.initrd.kernelModules = [ ];
20 boot.kernelModules = [ "kvm-intel" ];
21 boot.extraModulePackages = [ ];
22
23 fileSystems."/" = {
24 device = "/dev/disk/by-uuid/b949a6f8-8f30-4f68-9622-ae0f013bce8a";
25 fsType = "ext4";
26 };
27
28 fileSystems."/boot" = {
29 device = "/dev/disk/by-uuid/A49E-420F";
30 fsType = "vfat";
31 };
32
33 swapDevices = [
34 {
35 device = "/var/swap";
36 size = 16384;
37 }
38 ];
39 boot.resumeDevice = "/dev/disk/by-label/nixos";
40 # https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
41 boot.kernelParams = [
42 "mem_sleep_default=deep"
43 "resume_offset=142587904"
44 ];
45
46 powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
47 hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
48
49 nixpkgs.hostPlatform = "x86_64-linux";
50}