diff --git a/asus/zephyrus/ga403/default.nix b/asus/zephyrus/ga403/default.nix index 7ad96f9..d3c36ff 100644 --- a/asus/zephyrus/ga403/default.nix +++ b/asus/zephyrus/ga403/default.nix @@ -1,12 +1,17 @@ -{ config, +{ + config, pkgs, lib, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkForce version versionAtLeast versionOlder; -in { + inherit (lib) + mkDefault + mkForce + ; +in +{ imports = [ ../../../common/cpu/amd @@ -19,69 +24,69 @@ in { ../../../common/gpu/nvidia/ada-lovelace ]; - config = mkMerge [ - { - # Configure basic system settings: - boot = { - kernelPackages = mkDefault pkgs.linuxPackages_latest; - kernelModules = [ "kvm-amd" ]; - kernelParams = [ - "mem_sleep_default=deep" - "pcie_aspm.policy=powersupersave" - ]; + config = { + # Configure basic system settings: + boot = { + kernelPackages = mkDefault pkgs.linuxPackages_latest; + kernelModules = [ "kvm-amd" ]; + kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + ]; + }; + + services = { + asusd = { + enable = mkDefault true; + enableUserService = mkDefault true; }; - services = { - asusd = { - enable = mkDefault true; - enableUserService = mkDefault true; + supergfxd.enable = mkDefault true; + }; + + # Enable the Nvidia card, as well as Prime and Offload: NVIDIA GeForce RTX 4060 Mobile + boot.blacklistedKernelModules = [ "nouveau" ]; + + services.xserver.videoDrivers = mkForce [ + "amdgpu" + "nvidia" + ]; + + hardware = { + amdgpu.initrd.enable = mkDefault true; + + nvidia = { + modesetting.enable = true; + nvidiaSettings = mkDefault true; + + prime = { + offload = { + enable = mkDefault true; + enableOffloadCmd = mkDefault true; + }; + amdgpuBusId = "PCI:101:0:0"; + nvidiaBusId = "PCI:1:0:0"; }; - supergfxd.enable = mkDefault true; + powerManagement = { + enable = true; + finegrained = true; + }; }; - - # Enable the Nvidia card, as well as Prime and Offload: NVIDIA GeForce RTX 4060 Mobile - boot.blacklistedKernelModules = [ "nouveau" ]; - - services.xserver.videoDrivers = mkForce [ "amdgpu" "nvidia" ]; - - hardware = { - amdgpu.initrd.enable = mkDefault true; - - nvidia = { - modesetting.enable = true; - nvidiaSettings = mkDefault true; - - prime = { - offload = { - enable = mkDefault true; - enableOffloadCmd = mkDefault true; - }; - amdgpuBusId = "PCI:101:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - - powerManagement = { - enable = true; - finegrained = true; + }; + # Meditek doesn't seem to be quite sensitive enough on the default roaming settings: + # https://wiki.archlinux.org/title/Wpa_supplicant#Roaming + # https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming + # + # But NixOS doesn't have the tweaks for IWD, yet. + networking.wireless.iwd.settings = + lib.mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) + { + General = { + RoamThreshold = -75; + RoamThreshold5G = -80; + RoamRetryInterval = 20; }; }; - }; - } - - (mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) { - # Meditek doesn't seem to be quite sensitive enough on the default roaming settings: - # https://wiki.archlinux.org/title/Wpa_supplicant#Roaming - # https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming - # - # But NixOS doesn't have the tweaks for IWD, yet. - networking.wireless.iwd.settings = { - General = { - RoamThreshold = -75; - RoamThreshold5G = -80; - RoamRetryInterval = 20; - }; - }; - }) - ]; + }; } diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 0024102..f924290 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -6,7 +6,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop -gc ../../../common/pc/laptop/ssd ];