1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-26 19:49:45 +01:00
This commit is contained in:
caleb 2024-12-03 17:51:22 -05:00
commit 73dcf6ae07
2 changed files with 66 additions and 62 deletions

View file

@ -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,8 +24,7 @@ in {
../../../common/gpu/nvidia/ada-lovelace
];
config = mkMerge [
{
config = {
# Configure basic system settings:
boot = {
kernelPackages = mkDefault pkgs.linuxPackages_latest;
@ -43,7 +47,10 @@ in {
# Enable the Nvidia card, as well as Prime and Offload: NVIDIA GeForce RTX 4060 Mobile
boot.blacklistedKernelModules = [ "nouveau" ];
services.xserver.videoDrivers = mkForce [ "amdgpu" "nvidia" ];
services.xserver.videoDrivers = mkForce [
"amdgpu"
"nvidia"
];
hardware = {
amdgpu.initrd.enable = mkDefault true;
@ -67,21 +74,19 @@ in {
};
};
};
}
(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 = {
networking.wireless.iwd.settings =
lib.mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal)
{
General = {
RoamThreshold = -75;
RoamThreshold5G = -80;
RoamRetryInterval = 20;
};
};
})
];
};
}

View file

@ -6,7 +6,6 @@
../../../common/gpu/nvidia/prime.nix
../../../common/gpu/nvidia/turing
../../../common/pc/laptop
gc
../../../common/pc/laptop/ssd
];