steveej-x13s: use latest ath11k firmware and relax nix sandbox

This commit is contained in:
steveej 2024-07-26 14:09:34 +02:00
parent d7ceee4171
commit ea0d87fb89
3 changed files with 73 additions and 33 deletions

View file

@ -18,7 +18,7 @@
services.illum.enable = true; services.illum.enable = true;
systemd.services.bluetooth-mac = { systemd.services.bluetooth-x13s-mac = lib.mkForce {
enable = true; enable = true;
path = [ path = [
pkgs.systemd pkgs.systemd
@ -194,6 +194,10 @@
# ]; # ];
}; };
hardware.firmware = lib.mkBefore [
nodeFlake.packages.${system}.x13s-ath11k-firmware
];
# see https://linrunner.de/tlp/ # see https://linrunner.de/tlp/
# TODO: find an equivalent to tlp that supports this machine # TODO: find an equivalent to tlp that supports this machine
services.tlp = { services.tlp = {
@ -223,4 +227,11 @@
enable = true; enable = true;
autostart = false; autostart = false;
}; };
services.udev.packages = [
pkgs.android-udev-rules
];
programs.adb.enable = true;
nix.settings.sandbox = lib.mkForce "relaxed";
} }

View file

@ -1,5 +1,21 @@
{ {
"nodes": { "nodes": {
"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"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -28,11 +44,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718846788, "lastModified": 1721266288,
"narHash": "sha256-9dtXYtEkmXoUJV+PGLqscqF7qTn4AIhAKpFWRFU2NYs=", "narHash": "sha256-MsyTzXu9CJVcBr44ct8ILKF/Ro7VlF+tVZTylzAoXSs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "e1174d991944a01eaaa04bc59c6281edca4c0e6e", "rev": "e8e8d9a3a9c1d0e654ccda7834bf0288a9d15c47",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +75,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1719994518,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -111,11 +127,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718530513, "lastModified": 1720042825,
"narHash": "sha256-BmO8d0r+BVlwWtMLQEYnwmngqdXIuyFzMwvmTcLMee8=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a1fddf0967c33754271761d91a3d921772b30d0e", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -128,11 +144,11 @@
"mobile-nixos": { "mobile-nixos": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1715627339, "lastModified": 1721250279,
"narHash": "sha256-HJ6V7hc64iBqXlZ8kH4sXmUzPH+0Hn6wYURmZmL5LFk=", "narHash": "sha256-S47+MFnArDvR7OFCXU0BQoyLCBwSZws+t+bany7Ol6w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "mobile-nixos", "repo": "mobile-nixos",
"rev": "655c8830d5fe2eae79c8fc0bab8033b34c8456eb", "rev": "472073a51745cca03257cf625582252cdd04ec21",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -150,11 +166,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1718789228, "lastModified": 1721210676,
"narHash": "sha256-T68Ei2sIExC8R37gpWzDAcdh9mv/FLMzlmRzmr1D6nw=", "narHash": "sha256-6hwlFcRPbfW+tOrKnnx3AL/yWjXqkXHoiIpbFsPMEAg=",
"owner": "threefoldtech", "owner": "threefoldtech",
"repo": "mycelium", "repo": "mycelium",
"rev": "a0e6560add3ffd763a77656a586734be272a344e", "rev": "767060eb8bd5abcc8e375bdb8f0984bcb27936da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -184,11 +200,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1718132227, "lastModified": 1721131656,
"narHash": "sha256-1AFLd779W8m+q4tfr8TB0oza9GTbVxVrGzg3iZmuYAQ=", "narHash": "sha256-0EoouVAaS8GHZJitpzQ9S4s4Gps4hkzr8yQcgYkLxwo=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a95fcbdb0b90f46be425cfa8d88fc92b89cdf536", "rev": "f1a2bace41471300aa2b0c5c98e6e37087532e16",
"revCount": 81, "revCount": 91,
"type": "git", "type": "git",
"url": "https://codeberg.org/adamcstephens/nixos-x13s" "url": "https://codeberg.org/adamcstephens/nixos-x13s"
}, },
@ -215,23 +231,23 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1717284937, "lastModified": 1719876945,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1718530797, "lastModified": 1720957393,
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9", "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -243,11 +259,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1717974879, "lastModified": 1720957393,
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -259,11 +275,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1718717462, "lastModified": 1720954236,
"narHash": "sha256-qddfQLMaWR2gxfEzUM/zFZVK6H1kTv9WBQSBQxbP3MU=", "narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "938aa157bbd6e3c6fd7dcb77998b1f92c2ad1631", "rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -275,6 +291,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"ath11k-firmware": "ath11k-firmware",
"disko": "disko", "disko": "disko",
"get-flake": "get-flake", "get-flake": "get-flake",
"home-manager": "home-manager", "home-manager": "home-manager",

View file

@ -23,12 +23,17 @@
# 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";
flake = false;
};
}; };
outputs = { outputs = {
self, self,
get-flake, get-flake,
nixpkgs, nixpkgs,
ath11k-firmware,
... ...
}: let }: let
targetPlatform = "aarch64-linux"; targetPlatform = "aarch64-linux";
@ -90,5 +95,12 @@
]; ];
}; };
}; };
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/
'';
};
}; };
} }