Compare commits

..

3 commits

Author SHA1 Message Date
ba9e9f0916 experiment with k3s + nix-snapshotter 2024-08-04 14:14:45 +02:00
e2c12867ec add proprietary x13s bluetooth firmware 2024-08-04 14:14:33 +02:00
e4bc0b4ec4 feat: move x13s specific packages in top-level flake
this allows them to be reused more easily
2024-08-04 14:13:39 +02:00
5 changed files with 75 additions and 9 deletions

30
flake.lock generated
View file

@ -33,6 +33,22 @@
"type": "github" "type": "github"
} }
}, },
"ath11k-firmware": {
"flake": false,
"locked": {
"lastModified": 1720482684,
"narHash": "sha256-p6ifwtRNUOyQ2FN2VhSXS6dcrvrtiFZawu/iVXQ4uR0=",
"ref": "refs/heads/main",
"rev": "bb527dcebac835c47ed4f5428a7687769fa9b1b2",
"revCount": 152,
"type": "git",
"url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"
},
"original": {
"type": "git",
"url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"
}
},
"brainwart_x13s-nixos": { "brainwart_x13s-nixos": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -823,6 +839,7 @@
"inputs": { "inputs": {
"adamcstephens_stop-export": "adamcstephens_stop-export", "adamcstephens_stop-export": "adamcstephens_stop-export",
"aphorme_launcher": "aphorme_launcher", "aphorme_launcher": "aphorme_launcher",
"ath11k-firmware": "ath11k-firmware",
"brainwart_x13s-nixos": "brainwart_x13s-nixos", "brainwart_x13s-nixos": "brainwart_x13s-nixos",
"colmena": "colmena", "colmena": "colmena",
"crane": "crane", "crane": "crane",
@ -860,6 +877,7 @@
"salut": "salut", "salut": "salut",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"srvos": "srvos", "srvos": "srvos",
"x13s-bt-firmware": "x13s-bt-firmware",
"yofi": "yofi" "yofi": "yofi"
} }
}, },
@ -1057,6 +1075,18 @@
"type": "github" "type": "github"
} }
}, },
"x13s-bt-firmware": {
"flake": false,
"locked": {
"narHash": "sha256-FCWkZp+MtEGS5lS5+pxmpCl4wU9GGRegolebcmCN7RU=",
"type": "file",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65"
},
"original": {
"type": "file",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65"
}
},
"yofi": { "yofi": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",

View file

@ -119,6 +119,31 @@
flake = false; flake = false;
url = "github:espanso/espanso/db97658d1d80697a635b57801696c594eacf057b"; url = "github:espanso/espanso/db97658d1d80697a635b57801696c594eacf057b";
}; };
x13s-bt-firmware = {
flake = false;
# 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";
};
ath11k-firmware = {
url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git";
flake = false;
};
}; };
outputs = inputs @ { outputs = inputs @ {
@ -337,6 +362,18 @@
buildInputs = [ buildInputs = [
]; ];
}; };
x13s-bt-firmware = pkgs.runCommand "x13s-bt-firmware" {} ''
mkdir -p $out/lib/firmware/qca
cp -v ${self}/misc/x13s_bt_firmware/hpnv21g.b8c.crypt.fw $out/lib/firmware/qca/hpnv21.bin
cp -v ${inputs.x13s-bt-firmware} $out/lib/firmware/qca//hpbtfw21.tlv
'';
x13s-ath11k-firmware = pkgs.runCommand "x13s-ath11k-firmware-before" {} ''
mkdir -p $out/lib/firmware/ath11k/WCN6855/hw2.1/
cp -v ${inputs.ath11k-firmware}/WCN6855/hw2.1/{board-2,regdb}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/
cp -v ${inputs.ath11k-firmware}/WCN6855/hw2.1/1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41/{amss,m3}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/
'';
}; };
formatter = pkgs.alejandra; formatter = pkgs.alejandra;

Binary file not shown.

View file

@ -7,6 +7,7 @@
nodeName, nodeName,
localDomainName, localDomainName,
system, system,
packages',
... ...
}: { }: {
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -236,7 +237,8 @@
}; };
hardware.firmware = lib.mkBefore [ hardware.firmware = lib.mkBefore [
nodeFlake.packages.${system}.x13s-ath11k-firmware packages'.x13s-bt-firmware
packages'.x13s-ath11k-firmware
]; ];
# see https://linrunner.de/tlp/ # see https://linrunner.de/tlp/

View file

@ -20,9 +20,11 @@
# nixos-x13s.inputs.nixpkgs.follows = "nixpkgs"; # nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
mycelium.url = "github:threefoldtech/mycelium"; mycelium.url = "github:threefoldtech/mycelium";
ath11k-firmware = {
url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"; nix-snapshotter = {
flake = false; url = "github:yu-re-ka/nix-snapshotter";
# url = "github:pdtpartners/nix-snapshotter";
inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-snapshotter = { nix-snapshotter = {
@ -99,11 +101,6 @@
}; };
}; };
packages.${targetPlatform} = { packages.${targetPlatform} = {
x13s-ath11k-firmware = nixpkgs.legacyPackages.${targetPlatform}.runCommand "x13s-ath11k-firmware-before" {} ''
mkdir -p $out/lib/firmware/ath11k/WCN6855/hw2.1/
cp -v ${ath11k-firmware}/WCN6855/hw2.1/{board-2,regdb}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/
cp -v ${ath11k-firmware}/WCN6855/hw2.1/1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41/{amss,m3}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/
'';
}; };
}; };
} }