diff --git a/flake.nix b/flake.nix index 6f4cebff..3c654b1e 100644 --- a/flake.nix +++ b/flake.nix @@ -158,6 +158,7 @@ hw-common-ssd = import ./hwModules/common/ssd; hw-framework-13-amd-7000 = import ./hwModules/framework/13/amd-7000; hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th; + hw-lenovo-legion-go = import ./hwModules/lenovo/legion/go; hw-lenovo-yoga-9i-intel-13th = import ./hwModules/lenovo/yoga-9i/intel-13th; hw-thinkpad-t440p = import ./hwModules/thinkpad/t440p; diff --git a/hosts/pacifidlog/default.nix b/hosts/pacifidlog/default.nix index 30da2371..8ab6d2be 100644 --- a/hosts/pacifidlog/default.nix +++ b/hosts/pacifidlog/default.nix @@ -2,7 +2,6 @@ { config, lib, - pkgs, self, ... }: { @@ -19,27 +18,11 @@ self.nixosModules.common-pkgs self.nixosModules.common-tailscale self.nixosModules.common-wifi-profiles - self.nixosModules.hw-common-amd-cpu - self.nixosModules.hw-common-amd-gpu - self.nixosModules.hw-common-bluetooth - self.nixosModules.hw-common-ssd + self.nixosModules.hw-lenovo-legion-go ]; boot = { - initrd = { - availableKernelModules = [ - "nvme" - "sdhci_pci" - "thunderbolt" - "usb_storage" - "usbhid" - "xhci_pci" - ]; - - systemd.enable = true; - }; - - kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + initrd.systemd.enable = true; # lanzaboote = { # enable = true; @@ -93,14 +76,9 @@ }) ]; - services = { - handheld-daemon = { - enable = true; - user = "aly"; - }; - - power-profiles-daemon.enable = true; - upower.enable = true; + services.handheld-daemon = { + enable = true; + user = "aly"; }; system.stateVersion = "24.11"; diff --git a/hwModules/lenovo/common.nix b/hwModules/lenovo/common.nix deleted file mode 100644 index abb1e686..00000000 --- a/hwModules/lenovo/common.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - hardware.enableAllFirmware = true; -} diff --git a/hwModules/lenovo/legion/go/default.nix b/hwModules/lenovo/legion/go/default.nix new file mode 100644 index 00000000..54d5378a --- /dev/null +++ b/hwModules/lenovo/legion/go/default.nix @@ -0,0 +1,29 @@ +{ + pkgs, + lib, + self, + ... +}: { + imports = [ + self.nixosModules.hw-common-amd-cpu + self.nixosModules.hw-common-amd-gpu + self.nixosModules.hw-common-bluetooth + self.nixosModules.hw-common-ssd + ]; + + boot = { + initrd.availableKernelModules = ["nvme" "sdhci_pci" "thunderbolt" "usb_storage" "usbhid" "xhci_pci"]; + + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + }; + + hardware = { + enableAllFirmware = true; + sensor.iio.enable = true; + }; + + services = { + power-profiles-daemon.enable = true; + upower.enable = true; + }; +} diff --git a/hwModules/lenovo/yoga-9i/intel-13th/default.nix b/hwModules/lenovo/yoga-9i/intel-13th/default.nix index 7cc1c0db..caa4270c 100644 --- a/hwModules/lenovo/yoga-9i/intel-13th/default.nix +++ b/hwModules/lenovo/yoga-9i/intel-13th/default.nix @@ -10,7 +10,6 @@ ../../../common/laptop ../../../common/laptop/intel-cpu.nix ../../../common/ssd - ../../common.nix ../common.nix ]; @@ -18,4 +17,6 @@ initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"]; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; }; + + hardware.enableAllFirmware = true; }