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:
commit
45bf76ef95
22 changed files with 29 additions and 117 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
../.
|
../.
|
||||||
../../../common/pc/ssd
|
../../../common/pc/ssd
|
||||||
../../../common/gpu/24.05-compat.nix
|
|
||||||
../../../common/gpu/nvidia/kepler
|
../../../common/gpu/nvidia/kepler
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../.
|
../.
|
||||||
../../../common/gpu/24.05-compat.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
|
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
nixosVersion = lib.versions.majorMinor lib.version;
|
|
||||||
|
|
||||||
audioFiles = pkgs.fetchFromGitHub {
|
audioFiles = pkgs.fetchFromGitHub {
|
||||||
owner = "kekrby";
|
owner = "kekrby";
|
||||||
|
|
@ -106,16 +105,9 @@ in
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
(
|
{
|
||||||
if lib.versionAtLeast nixosVersion "25.05" then
|
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||||
{
|
}
|
||||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
(lib.mkIf t2Cfg.enableIGPU {
|
(lib.mkIf t2Cfg.enableIGPU {
|
||||||
# Enable the iGPU by default if present
|
# Enable the iGPU by default if present
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -11,9 +10,7 @@ let
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
mkIf
|
mkIf
|
||||||
mkMerge
|
mkMerge
|
||||||
version
|
|
||||||
versionAtLeast
|
versionAtLeast
|
||||||
versionOlder
|
|
||||||
;
|
;
|
||||||
|
|
||||||
cfg = config.hardware.asus.zephyrus.ga402x;
|
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) {
|
(mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) {
|
||||||
# Meditek doesn't seem to be quite sensitive enough on the default roaming settings:
|
# 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/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, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../24.05-compat.nix ];
|
|
||||||
config = {
|
config = {
|
||||||
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [ ../24.05-compat.nix ];
|
|
||||||
|
|
||||||
options.hardware.intelgpu = {
|
options.hardware.intelgpu = {
|
||||||
driver = lib.mkOption {
|
driver = lib.mkOption {
|
||||||
description = "Intel GPU driver to use";
|
description = "Intel GPU driver to use";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../24.05-compat.nix ];
|
|
||||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,5 @@
|
||||||
{
|
{
|
||||||
imports = [ ../. ];
|
imports = [ ../. ];
|
||||||
|
|
||||||
# Gnome 40 introduced a new way of managing power, without tlp.
|
services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable);
|
||||||
# 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
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
# Override the Intel gpu driver setting imported above
|
# Override the Intel gpu driver setting imported above
|
||||||
environment.variables = {
|
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;
|
services.thermald.enable = lib.mkDefault true;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkDefault mkIf;
|
inherit (lib) mkDefault;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../common/pc/laptop
|
../../common/pc/laptop
|
||||||
../../common/pc/ssd
|
../../common/pc/ssd
|
||||||
../../common/hidpi.nix
|
../../common/hidpi.nix
|
||||||
../../common/gpu/24.05-compat.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Necessary kernel modules
|
# Necessary kernel modules
|
||||||
|
|
@ -22,12 +21,7 @@ in
|
||||||
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
||||||
hardware.graphics.extraPackages = with pkgs; [
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
(
|
intel-vaapi-driver
|
||||||
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
|
||||||
vaapiIntel
|
|
||||||
else
|
|
||||||
intel-vaapi-driver
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
|
@ -46,7 +40,6 @@ in
|
||||||
# Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow.
|
# 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.
|
# Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594.
|
||||||
hinting.enable = mkDefault false;
|
hinting.enable = mkDefault false;
|
||||||
antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# More HiDPI settings
|
# More HiDPI settings
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,7 @@
|
||||||
"video=eDP-1:panel_orientation=right_side_up"
|
"video=eDP-1:panel_orientation=right_side_up"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.tlp.enable = lib.mkDefault (
|
services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable);
|
||||||
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
|
||||||
|| !config.services.power-profiles-daemon.enable
|
|
||||||
);
|
|
||||||
|
|
||||||
# Required for grub to properly display the boot menu.
|
# Required for grub to properly display the boot menu.
|
||||||
boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32";
|
boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Linux 5.15 sometimes crash under heavy network usage
|
# 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";
|
hardware.deviceTree.filter = "meson-sm1-odroid-hc4.dtb";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
../../../../common/gpu/24.05-compat.nix
|
|
||||||
];
|
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/gpu/24.05-compat.nix
|
|
||||||
../../../common/gpu/nvidia/prime.nix
|
../../../common/gpu/nvidia/prime.nix
|
||||||
../../../common/gpu/nvidia/maxwell
|
../../../common/gpu/nvidia/maxwell
|
||||||
../../../common/cpu/intel/kaby-lake
|
../../../common/cpu/intel/kaby-lake
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/gpu/24.05-compat.nix
|
|
||||||
../../../common/gpu/nvidia/prime.nix
|
../../../common/gpu/nvidia/prime.nix
|
||||||
../../../common/gpu/nvidia/pascal
|
../../../common/gpu/nvidia/pascal
|
||||||
../../../common/cpu/intel
|
../../../common/cpu/intel
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/jhovold/linux/wiki/X13s#modem
|
# https://github.com/jhovold/linux/wiki/X13s#modem
|
||||||
networking.networkmanager.fccUnlockScripts = [
|
networking.modemmanager.fccUnlockScripts = [
|
||||||
|
|
||||||
{
|
{
|
||||||
id = "105b:e0c3";
|
id = "105b:e0c3";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -14,8 +14,7 @@
|
||||||
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}";
|
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if lib.versionOlder lib.version "25.05pre" then
|
{
|
||||||
{ networkmanager.fccUnlockScripts = [ fcc_unlock_script ]; }
|
modemmanager.fccUnlockScripts = [ fcc_unlock_script ];
|
||||||
else
|
};
|
||||||
{ modemmanager.fccUnlockScripts = [ fcc_unlock_script ]; };
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,25 +19,14 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05" then
|
{
|
||||||
{
|
assertions = [
|
||||||
assertions = [
|
{
|
||||||
{
|
assertion = config.services.pulseaudio.enable;
|
||||||
assertion = config.hardware.pulseaudio.enable;
|
message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`.";
|
||||||
message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`.";
|
}
|
||||||
}
|
];
|
||||||
];
|
services.pulseaudio = paConfig;
|
||||||
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;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
tests/flake.lock
generated
8
tests/flake.lock
generated
|
|
@ -2,16 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixos-stable": {
|
"nixos-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761597516,
|
"lastModified": 1767799921,
|
||||||
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
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.url = "github:numtide/treefmt-nix";
|
||||||
treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small";
|
treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,5 @@
|
||||||
services.thermald.enable = lib.mkDefault true;
|
services.thermald.enable = lib.mkDefault true;
|
||||||
|
|
||||||
# keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight
|
# keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight
|
||||||
hardware =
|
hardware.tuxedo-drivers.enable = lib.mkDefault true;
|
||||||
if lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11" then
|
|
||||||
{
|
|
||||||
tuxedo-drivers.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tuxedo-keyboard.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue