Compare commits
37 commits
Author | SHA1 | Date | |
---|---|---|---|
8bd7972c74 | |||
465bfd5d45 | |||
66640a57be | |||
c15672e260 | |||
f4591e4478 | |||
7a10b19edc | |||
4b33de16a0 | |||
df9d37e84a | |||
3201095d3d | |||
b12e6ec3ac | |||
4736fc5861 | |||
6784c72db5 | |||
fe236e55c5 | |||
00a940407a | |||
743ad5409e | |||
5583f444c6 | |||
483f41c278 | |||
3c79ed01fb | |||
77c000d82d | |||
c95058f8aa | |||
b116d698f4 | |||
80d92e5c1f | |||
4ad2bf71ca | |||
46229fc2b9 | |||
0727184585 | |||
6f09467241 | |||
887d0550a7 | |||
01295d13ce | |||
b78fc5d593 | |||
b957608c2a | |||
b74e8bfe82 | |||
ff41877fbd | |||
13748008ae | |||
5951832660 | |||
1166c321f8 | |||
cfbc504653 | |||
6e515f7988 |
5 changed files with 95 additions and 24 deletions
48
flake.lock
generated
48
flake.lock
generated
|
@ -5,11 +5,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725234343,
|
||||
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -21,27 +21,27 @@
|
|||
"linux-jhovold": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1728631036,
|
||||
"narHash": "sha256-1LnClVjY6WS+IR9eqPFA7gzXm0cio3mY23NXj9cKHHs=",
|
||||
"lastModified": 1745847827,
|
||||
"narHash": "sha256-ewM7Rpd6On6ys3OkcWOtR7TNWSRZRLZpRP7L9syhn6s=",
|
||||
"owner": "jhovold",
|
||||
"repo": "linux",
|
||||
"rev": "6a97bc22fa36010400b91e6d5979741c391112c3",
|
||||
"rev": "1786db28b335abb5a0fa1e8a27e9950a73f64acf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jhovold",
|
||||
"ref": "wip/sc8280xp-6.12-rc2",
|
||||
"ref": "wip/sc8280xp-6.15-rc4",
|
||||
"repo": "linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1725432240,
|
||||
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
|
||||
"lastModified": 1740560979,
|
||||
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
|
||||
"rev": "5135c59491985879812717f4c9fea69604e7f26f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -53,21 +53,39 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1725233747,
|
||||
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
|
||||
"lastModified": 1733096140,
|
||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
41
flake.nix
41
flake.nix
|
@ -3,8 +3,33 @@
|
|||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.12-rc2";
|
||||
linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.15-rc4";
|
||||
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 =
|
||||
|
@ -21,8 +46,18 @@
|
|||
];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, inputs' , system, lib, ... }:
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
# overlay here
|
||||
})
|
||||
];
|
||||
config = { };
|
||||
};
|
||||
|
||||
devShells = rec {
|
||||
default = pkgs.mkShellNoCC { packages = ci.nativeBuildInputs; };
|
||||
|
||||
|
@ -61,6 +96,8 @@
|
|||
nixos-x13s.enable = true;
|
||||
nixos-x13s.kernel = "jhovold"; # jhovold is default
|
||||
|
||||
nixos-x13s.bluetoothMac = "02:68:b3:29:da:98";
|
||||
|
||||
# allow unfree firmware
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ let
|
|||
paths = [
|
||||
modulesClosure
|
||||
x13sPackages.graphics-firmware
|
||||
x13sPackages.bluetooth-firmware
|
||||
];
|
||||
};
|
||||
in
|
||||
|
@ -53,7 +54,10 @@ in
|
|||
environment.systemPackages = [ pkgs.efibootmgr ];
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.firmware = lib.mkBefore [ x13sPackages.graphics-firmware ];
|
||||
hardware.firmware = lib.mkBefore [
|
||||
x13sPackages.graphics-firmware
|
||||
x13sPackages.bluetooth-firmware
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.systemd.enable = true;
|
||||
|
@ -74,11 +78,10 @@ in
|
|||
"dtb=${dtbEfiPath}"
|
||||
|
||||
# jhovold recommended
|
||||
"efi=noruntime"
|
||||
"clk_ignore_unused"
|
||||
"pd_ignore_unused"
|
||||
"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 = {
|
||||
|
|
|
@ -20,13 +20,19 @@ let
|
|||
};
|
||||
|
||||
extraMeta.branch = lib.versions.majorMinor version;
|
||||
ignoreConfigErrors = true;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
linux_jhovold = pkgs.callPackage linux_x13s_pkg {
|
||||
src = inputs.linux-jhovold;
|
||||
version = "6.12.0-rc2";
|
||||
version = let
|
||||
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";
|
||||
};
|
||||
|
||||
|
@ -42,4 +48,9 @@ in
|
|||
${lib.getExe pkgs.innoextract} ${gpu-src}
|
||||
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/
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# https://support.lenovo.com/us/en/downloads/ds556845-bios-update-utility-bootable-cd-for-windows-11-thinkpad-x13s-gen-1-type-21bx-21by
|
||||
|
||||
{
|
||||
stdenv,
|
||||
fetchurl,
|
||||
|
@ -6,11 +8,11 @@
|
|||
|
||||
stdenv.mkDerivation {
|
||||
name = "uefi";
|
||||
version = "1.60";
|
||||
version = "1.61";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.lenovo.com/pccbbs/mobiles/n3huj19w.exe";
|
||||
hash = "sha256-ZSjkvbMb0e9CoL2OYo3Aioyz3or1YkOX/BdOOeAuL7I=";
|
||||
url = "https://download.lenovo.com/pccbbs/mobiles/n3huj20w.exe";
|
||||
hash = "sha256-A3l/ZfIbFcvFX+bMWYgpW+1kkYPu5MQkuTCgszhaoIY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ innoextract ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue