fix: Use nixpkgs 25.05 for building the kernel for the Surface tablets

instead of 25.11
This commit is contained in:
2025-12-04 17:04:53 -05:00
committed by Hunter Halloran
parent 6f3a0ff2bf
commit 53e3de1740
4 changed files with 49 additions and 5 deletions

36
flake.lock generated
View File

@@ -266,6 +266,22 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1764440730,
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1732981179,
@@ -282,6 +298,22 @@
"type": "github"
}
},
"nixpkgs-old-kernel": {
"locked": {
"lastModified": 1764560356,
"narHash": "sha256-M5aFEFPppI4UhdOxwdmceJ9bDJC4T6C6CzCK1E2FZyo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c8f0cca84510cc79e09ea99a299c9bc17d03cb6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764522689,
@@ -359,7 +391,9 @@
"disko": "disko",
"home-manager": "home-manager",
"lazyvim-nixvim": "lazyvim-nixvim",
"nixpkgs": "nixpkgs_2"
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nixpkgs-old-kernel": "nixpkgs-old-kernel"
}
},
"systems": {

View File

@@ -1,6 +1,7 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-old-kernel.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
@@ -12,7 +13,7 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
lazyvim-nixvim.url = "github:azuwis/lazyvim-nixvim";
};
outputs = inputs@{ self, nixpkgs, home-manager, disko, lazyvim-nixvim, nixos-hardware,... }: {
outputs = inputs@{ self, nixpkgs, nixpkgs-old-kernel, home-manager, disko, lazyvim-nixvim, nixos-hardware,... }: {
nixosConfigurations = import ./hosts { inherit inputs; };
};
}

View File

@@ -1,4 +1,4 @@
{ inputs }:
{ inputs, ... }:
let
nixpkgs = inputs.nixpkgs;

View File

@@ -1,4 +1,11 @@
{ config, lib, modulesPath, ... }:
{ config, lib, pkgs, inputs, modulesPath, ... }:
let
refSystem = inputs.nixpkgs-old-kernel.lib.nixosSystem {
system = pkgs.system;
modules = [ inputs.nixos-hardware.nixosModules.microsoft-surface-go ];
};
refKernelPackages = refSystem.config.boot.kernelPackages;
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
@@ -16,7 +23,9 @@
"rd.systemd.show_status=auto"
];
disko.devices.disk.main.content.partitions.swap.size = "16G";
boot.kernelPackages = lib.mkForce refKernelPackages;
disko.devices.disk.main.content.partitions.swap.size = "8G";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;