From d57f765ef6c07c67d95c3b65154c4d9757c05cf4 Mon Sep 17 00:00:00 2001 From: traxys Date: Wed, 15 Dec 2021 10:16:23 +0100 Subject: [PATCH] thinkpad-nixos: hardware configuration --- flake.nix | 1 + .../thinkpad-nixos/hardware-configuration.nix | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 hostconfig/thinkpad-nixos/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 20cb76f..3243446 100644 --- a/flake.nix +++ b/flake.nix @@ -210,6 +210,7 @@ modules = [ ./hostconfig/thinkpad-nixos/extra_info.nix ./hostconfig/thinkpad-nixos/nixos.nix + ./hostconfig/thinkpad-nixos/hardware-configuration.nix self.nixosModules.minimal self.nixosModules.personal-cli self.nixosModules.personal-gui diff --git a/hostconfig/thinkpad-nixos/hardware-configuration.nix b/hostconfig/thinkpad-nixos/hardware-configuration.nix new file mode 100644 index 0000000..f0003d5 --- /dev/null +++ b/hostconfig/thinkpad-nixos/hardware-configuration.nix @@ -0,0 +1,35 @@ +# 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" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = ["dm-snapshot"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/a53e1f39-a9e9-481b-a970-740d0c549181"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/21EC-4041"; + fsType = "vfat"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/ff3ba4e7-71e0-4723-b2d1-b1ca61f99337";} + ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +}