mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +01:00
Merge pull request #1727 from NixOS/drop-24.05-compat
Update to current nixpkgs stable 25.11, drop old compat code
This commit is contained in:
22 files changed
+29
-117
No files matched your search
@@ -4,7 +4,6 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/ssd
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
../../../common/gpu/nvidia/kepler
|
||||
];
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ in
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
|
||||
|
||||
+3
-11
@@ -7,7 +7,6 @@
|
||||
|
||||
let
|
||||
inherit (lib) types;
|
||||
nixosVersion = lib.versions.majorMinor lib.version;
|
||||
|
||||
audioFiles = pkgs.fetchFromGitHub {
|
||||
owner = "kekrby";
|
||||
@@ -106,16 +105,9 @@ in
|
||||
powerManagement.enable = true;
|
||||
}
|
||||
|
||||
(
|
||||
if lib.versionAtLeast nixosVersion "25.05" then
|
||||
{
|
||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
}
|
||||
else
|
||||
{
|
||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
}
|
||||
)
|
||||
{
|
||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
}
|
||||
|
||||
(lib.mkIf t2Cfg.enableIGPU {
|
||||
# Enable the iGPU by default if present
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
@@ -11,9 +10,7 @@ let
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkMerge
|
||||
version
|
||||
versionAtLeast
|
||||
versionOlder
|
||||
;
|
||||
|
||||
cfg = config.hardware.asus.zephyrus.ga402x;
|
||||
@@ -94,12 +91,6 @@ in
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf (versionOlder version "23.11") {
|
||||
# See https://asus-linux.org/wiki/nixos/ for info about some problems
|
||||
# detecting the dGPU:
|
||||
systemd.services.supergfxd.path = [ pkgs.pciutils ];
|
||||
})
|
||||
|
||||
(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
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
||||
imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ])
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "extraPackages" ]
|
||||
[ "hardware" "opengl" "extraPackages" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "extraPackages32" ]
|
||||
[ "hardware" "opengl" "extraPackages32" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "enable32Bit" ]
|
||||
[ "hardware" "opengl" "driSupport32Bit" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ])
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
config = {
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
|
||||
options.hardware.intelgpu = {
|
||||
driver = lib.mkOption {
|
||||
description = "Intel GPU driver to use";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||
}
|
||||
@@ -3,11 +3,5 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
# Gnome 40 introduced a new way of managing power, without tlp.
|
||||
# However, these 2 services clash when enabled simultaneously.
|
||||
# https://github.com/NixOS/nixos-hardware/issues/260
|
||||
services.tlp.enable = lib.mkDefault (
|
||||
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
||||
|| !config.services.power-profiles-daemon.enable
|
||||
);
|
||||
services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable);
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
# Override the Intel gpu driver setting imported above
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkOverride 990 "nvidia");
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkOverride 990 "nvidia");
|
||||
};
|
||||
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkDefault mkIf;
|
||||
inherit (lib) mkDefault;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../common/pc/laptop
|
||||
../../common/pc/ssd
|
||||
../../common/hidpi.nix
|
||||
../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# Necessary kernel modules
|
||||
@@ -22,12 +21,7 @@ in
|
||||
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
(
|
||||
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
||||
vaapiIntel
|
||||
else
|
||||
intel-vaapi-driver
|
||||
)
|
||||
intel-vaapi-driver
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
@@ -46,7 +40,6 @@ in
|
||||
# Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow.
|
||||
# Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594.
|
||||
hinting.enable = mkDefault false;
|
||||
antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false;
|
||||
};
|
||||
|
||||
# More HiDPI settings
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
"video=eDP-1:panel_orientation=right_side_up"
|
||||
];
|
||||
|
||||
services.tlp.enable = lib.mkDefault (
|
||||
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
||||
|| !config.services.power-profiles-daemon.enable
|
||||
);
|
||||
services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable);
|
||||
|
||||
# Required for grub to properly display the boot menu.
|
||||
boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32";
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
};
|
||||
|
||||
# Linux 5.15 sometimes crash under heavy network usage
|
||||
systemd.watchdog.runtimeTime = lib.mkDefault "1min";
|
||||
systemd.settings.Manager.RuntimeWatchdogSec = lib.mkDefault "1min";
|
||||
|
||||
hardware.deviceTree.filter = "meson-sm1-odroid-hc4.dtb";
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/gpu/nvidia/maxwell
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/gpu/nvidia/pascal
|
||||
../../../common/cpu/intel
|
||||
|
||||
@@ -78,7 +78,7 @@ in
|
||||
};
|
||||
|
||||
# https://github.com/jhovold/linux/wiki/X13s#modem
|
||||
networking.networkmanager.fccUnlockScripts = [
|
||||
networking.modemmanager.fccUnlockScripts = [
|
||||
|
||||
{
|
||||
id = "105b:e0c3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -14,8 +14,7 @@
|
||||
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}";
|
||||
};
|
||||
in
|
||||
if lib.versionOlder lib.version "25.05pre" then
|
||||
{ networkmanager.fccUnlockScripts = [ fcc_unlock_script ]; }
|
||||
else
|
||||
{ modemmanager.fccUnlockScripts = [ fcc_unlock_script ]; };
|
||||
{
|
||||
modemmanager.fccUnlockScripts = [ fcc_unlock_script ];
|
||||
};
|
||||
}
|
||||
@@ -19,25 +19,14 @@
|
||||
'';
|
||||
};
|
||||
in
|
||||
if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05" then
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.hardware.pulseaudio.enable;
|
||||
message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`.";
|
||||
}
|
||||
];
|
||||
hardware.pulseaudio = paConfig;
|
||||
}
|
||||
else
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.services.pulseaudio.enable;
|
||||
message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`.";
|
||||
}
|
||||
];
|
||||
services.pulseaudio = paConfig;
|
||||
}
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.services.pulseaudio.enable;
|
||||
message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`.";
|
||||
}
|
||||
];
|
||||
services.pulseaudio = paConfig;
|
||||
}
|
||||
);
|
||||
}
|
||||
Generated
+4
-4
@@ -2,16 +2,16 @@
|
||||
"nodes": {
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1761597516,
|
||||
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
||||
"lastModified": 1767799921,
|
||||
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
||||
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.05",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small";
|
||||
};
|
||||
|
||||
@@ -10,13 +10,5 @@
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
# keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight
|
||||
hardware =
|
||||
if lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11" then
|
||||
{
|
||||
tuxedo-drivers.enable = lib.mkDefault true;
|
||||
}
|
||||
else
|
||||
{
|
||||
tuxedo-keyboard.enable = lib.mkDefault true;
|
||||
};
|
||||
hardware.tuxedo-drivers.enable = lib.mkDefault true;
|
||||
}
|
||||
Reference in new issue
Block a user