Compare commits

..

No commits in common. "bump" and "main" have entirely different histories.
bump ... main

5 changed files with 24 additions and 95 deletions

48
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1733312601, "lastModified": 1725234343,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -21,27 +21,27 @@
"linux-jhovold": { "linux-jhovold": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1745847827, "lastModified": 1728631036,
"narHash": "sha256-ewM7Rpd6On6ys3OkcWOtR7TNWSRZRLZpRP7L9syhn6s=", "narHash": "sha256-1LnClVjY6WS+IR9eqPFA7gzXm0cio3mY23NXj9cKHHs=",
"owner": "jhovold", "owner": "jhovold",
"repo": "linux", "repo": "linux",
"rev": "1786db28b335abb5a0fa1e8a27e9950a73f64acf", "rev": "6a97bc22fa36010400b91e6d5979741c391112c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "jhovold", "owner": "jhovold",
"ref": "wip/sc8280xp-6.15-rc4", "ref": "wip/sc8280xp-6.12-rc2",
"repo": "linux", "repo": "linux",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1740560979, "lastModified": 1725432240,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", "narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5135c59491985879812717f4c9fea69604e7f26f", "rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,39 +53,21 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1733096140, "lastModified": 1725233747,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"linux-jhovold": "linux-jhovold", "linux-jhovold": "linux-jhovold",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"x13s-bt-linux-firmware": "x13s-bt-linux-firmware"
}
},
"x13s-bt-linux-firmware": {
"flake": false,
"locked": {
"lastModified": 1733240564,
"narHash": "sha256-348f+wuX7x8xqaBRkraTclupdnRcwL/z2l/1Bs/reXc=",
"ref": "refs/heads/main",
"rev": "06aea4d8bfd5ca3624b56162b24339d7b0449913",
"revCount": 4282,
"type": "git",
"url": "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
},
"original": {
"rev": "06aea4d8bfd5ca3624b56162b24339d7b0449913",
"type": "git",
"url": "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
} }
} }
}, },

View file

@ -3,33 +3,8 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.15-rc4"; linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.12-rc2";
linux-jhovold.flake = false; linux-jhovold.flake = false;
x13s-bt-linux-firmware = {
flake = false;
# 2024-12-05 now required by jhovold's (and soon mainline) kernel. need two files from here: hpnv21.b8c hpnv21g.b8c
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpnv21.b8c?id=8d24066f829b97966818fd0d9b5881190670f53f";
url = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git?rev=06aea4d8bfd5ca3624b56162b24339d7b0449913";
# revisions for this file: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/qca/hpbtfw21.tlv
# 2024-07-29
# not working well
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=d118dc8ad5562ac0ae0c07be748cbe35a9361b47";
# 2024-05-30
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=436b0a920352d13290043d9ec9e50c420ab10f92";
# 2023-12-18
# not working well
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=598f5bd22361d7e92eebe8452d1f8013a1d35b9a";
# 2013-01-17
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65";
};
}; };
outputs = outputs =
@ -46,18 +21,8 @@
]; ];
perSystem = perSystem =
{ pkgs, inputs' , system, lib, ... }: { pkgs, ... }:
{ {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(final: prev: {
# overlay here
})
];
config = { };
};
devShells = rec { devShells = rec {
default = pkgs.mkShellNoCC { packages = ci.nativeBuildInputs; }; default = pkgs.mkShellNoCC { packages = ci.nativeBuildInputs; };
@ -96,8 +61,6 @@
nixos-x13s.enable = true; nixos-x13s.enable = true;
nixos-x13s.kernel = "jhovold"; # jhovold is default nixos-x13s.kernel = "jhovold"; # jhovold is default
nixos-x13s.bluetoothMac = "02:68:b3:29:da:98";
# allow unfree firmware # allow unfree firmware
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

@ -28,7 +28,6 @@ let
paths = [ paths = [
modulesClosure modulesClosure
x13sPackages.graphics-firmware x13sPackages.graphics-firmware
x13sPackages.bluetooth-firmware
]; ];
}; };
in in
@ -54,10 +53,7 @@ in
environment.systemPackages = [ pkgs.efibootmgr ]; environment.systemPackages = [ pkgs.efibootmgr ];
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
hardware.firmware = lib.mkBefore [ hardware.firmware = lib.mkBefore [ x13sPackages.graphics-firmware ];
x13sPackages.graphics-firmware
x13sPackages.bluetooth-firmware
];
boot = { boot = {
initrd.systemd.enable = true; initrd.systemd.enable = true;
@ -78,10 +74,11 @@ in
"dtb=${dtbEfiPath}" "dtb=${dtbEfiPath}"
# jhovold recommended # jhovold recommended
"efi=noruntime"
"clk_ignore_unused" "clk_ignore_unused"
"pd_ignore_unused" "pd_ignore_unused"
"arm64.nopauth" "arm64.nopauth"
# "regulator_ignore_unused" # allows for > 30 sec to load msm, at the potential cost of power "regulator_ignore_unused" # allows for > 30 sec to load msm, at the potential cost of power
]; ];
initrd = { initrd = {

View file

@ -20,19 +20,13 @@ let
}; };
extraMeta.branch = lib.versions.majorMinor version; extraMeta.branch = lib.versions.majorMinor version;
ignoreConfigErrors = true;
} }
); );
in in
{ {
linux_jhovold = pkgs.callPackage linux_x13s_pkg { linux_jhovold = pkgs.callPackage linux_x13s_pkg {
src = inputs.linux-jhovold; src = inputs.linux-jhovold;
version = let version = "6.12.0-rc2";
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
original = builtins.elemAt (builtins.tail (builtins.split "xp-" lock.nodes.linux-jhovold.original.ref)) 1;
modVersion = lib.versions.pad 3 original;
in modVersion;
defconfig = "johan_defconfig"; defconfig = "johan_defconfig";
}; };
@ -48,9 +42,4 @@ in
${lib.getExe pkgs.innoextract} ${gpu-src} ${lib.getExe pkgs.innoextract} ${gpu-src}
cp -v code\$GetExtractPath\$/*/*.mbn "$out/lib/firmware/qcom/sc8280xp/LENOVO/21BX/" cp -v code\$GetExtractPath\$/*/*.mbn "$out/lib/firmware/qcom/sc8280xp/LENOVO/21BX/"
''; '';
bluetooth-firmware = pkgs.runCommand "x13s-bluetooth-firmware" { } ''
mkdir -p $out/lib/firmware/qca
cp -v ${inputs.x13s-bt-linux-firmware}/qca/{hpnv21.b8c,hpnv21g.b8c} $out/lib/firmware/qca/
'';
} }

View file

@ -1,5 +1,3 @@
# https://support.lenovo.com/us/en/downloads/ds556845-bios-update-utility-bootable-cd-for-windows-11-thinkpad-x13s-gen-1-type-21bx-21by
{ {
stdenv, stdenv,
fetchurl, fetchurl,
@ -8,11 +6,11 @@
stdenv.mkDerivation { stdenv.mkDerivation {
name = "uefi"; name = "uefi";
version = "1.61"; version = "1.60";
src = fetchurl { src = fetchurl {
url = "https://download.lenovo.com/pccbbs/mobiles/n3huj20w.exe"; url = "https://download.lenovo.com/pccbbs/mobiles/n3huj19w.exe";
hash = "sha256-A3l/ZfIbFcvFX+bMWYgpW+1kkYPu5MQkuTCgszhaoIY="; hash = "sha256-ZSjkvbMb0e9CoL2OYo3Aioyz3or1YkOX/BdOOeAuL7I=";
}; };
nativeBuildInputs = [ innoextract ]; nativeBuildInputs = [ innoextract ];