From 985e3435c87d8009c6beab089bfca52007339b57 Mon Sep 17 00:00:00 2001 From: Sneexy Date: Sun, 21 Apr 2024 14:10:16 -0500 Subject: [PATCH] chore: add thunkpad hardware config --- machines/thunkpad/hardware-configuration.nix | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 machines/thunkpad/hardware-configuration.nix diff --git a/machines/thunkpad/hardware-configuration.nix b/machines/thunkpad/hardware-configuration.nix new file mode 100644 index 0000000..ed37e05 --- /dev/null +++ b/machines/thunkpad/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/169dd244-d0c4-4a9d-a11f-3e25452d153f"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DC4A-FCD9"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}