mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-27 03:59:45 +01:00
Merge branch 'master' of https://github.com/Mydien27/nixos-hardware
This commit is contained in:
commit
73dcf6ae07
2 changed files with 66 additions and 62 deletions
|
@ -1,12 +1,17 @@
|
||||||
{ config,
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkForce version versionAtLeast versionOlder;
|
inherit (lib)
|
||||||
in {
|
mkDefault
|
||||||
|
mkForce
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/cpu/amd
|
../../../common/cpu/amd
|
||||||
|
@ -19,69 +24,69 @@ in {
|
||||||
../../../common/gpu/nvidia/ada-lovelace
|
../../../common/gpu/nvidia/ada-lovelace
|
||||||
];
|
];
|
||||||
|
|
||||||
config = mkMerge [
|
config = {
|
||||||
{
|
# Configure basic system settings:
|
||||||
# Configure basic system settings:
|
boot = {
|
||||||
boot = {
|
kernelPackages = mkDefault pkgs.linuxPackages_latest;
|
||||||
kernelPackages = mkDefault pkgs.linuxPackages_latest;
|
kernelModules = [ "kvm-amd" ];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelParams = [
|
||||||
kernelParams = [
|
"mem_sleep_default=deep"
|
||||||
"mem_sleep_default=deep"
|
"pcie_aspm.policy=powersupersave"
|
||||||
"pcie_aspm.policy=powersupersave"
|
];
|
||||||
];
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
asusd = {
|
||||||
|
enable = mkDefault true;
|
||||||
|
enableUserService = mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
supergfxd.enable = mkDefault true;
|
||||||
asusd = {
|
};
|
||||||
enable = mkDefault true;
|
|
||||||
enableUserService = 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
|
# Meditek doesn't seem to be quite sensitive enough on the default roaming settings:
|
||||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
# https://wiki.archlinux.org/title/Wpa_supplicant#Roaming
|
||||||
|
# https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming
|
||||||
services.xserver.videoDrivers = mkForce [ "amdgpu" "nvidia" ];
|
#
|
||||||
|
# But NixOS doesn't have the tweaks for IWD, yet.
|
||||||
hardware = {
|
networking.wireless.iwd.settings =
|
||||||
amdgpu.initrd.enable = mkDefault true;
|
lib.mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal)
|
||||||
|
{
|
||||||
nvidia = {
|
General = {
|
||||||
modesetting.enable = true;
|
RoamThreshold = -75;
|
||||||
nvidiaSettings = mkDefault true;
|
RoamThreshold5G = -80;
|
||||||
|
RoamRetryInterval = 20;
|
||||||
prime = {
|
|
||||||
offload = {
|
|
||||||
enable = mkDefault true;
|
|
||||||
enableOffloadCmd = mkDefault true;
|
|
||||||
};
|
|
||||||
amdgpuBusId = "PCI:101:0:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
|
|
||||||
powerManagement = {
|
|
||||||
enable = true;
|
|
||||||
finegrained = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
(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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
../../../common/gpu/nvidia/prime.nix
|
../../../common/gpu/nvidia/prime.nix
|
||||||
../../../common/gpu/nvidia/turing
|
../../../common/gpu/nvidia/turing
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
gc
|
|
||||||
../../../common/pc/laptop/ssd
|
../../../common/pc/laptop/ssd
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue