103 lines
2.7 KiB
Nix
103 lines
2.7 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
|
|
# required for home-manager modules
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
get-flake.url = "github:ursi/get-flake";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
|
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?ref=refs/tags/2024-02-28";
|
|
# nixos-x13s.url = "path:/home/steveej/src/others/nixos-x13s";
|
|
# nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
mycelium.url = "github:threefoldtech/mycelium";
|
|
ath11k-firmware = {
|
|
url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
get-flake,
|
|
nixpkgs,
|
|
ath11k-firmware,
|
|
...
|
|
}: let
|
|
targetPlatform = "aarch64-linux";
|
|
buildPlatform = "x86_64-linux";
|
|
repoFlake = get-flake ../../../..;
|
|
|
|
mkNixosConfiguration = {
|
|
nodeName,
|
|
extraModules ? [],
|
|
...
|
|
} @ attrs:
|
|
nixpkgs.lib.nixosSystem (
|
|
nixpkgs.lib.attrsets.recursiveUpdate
|
|
attrs
|
|
{
|
|
specialArgs =
|
|
(import ./default.nix {
|
|
system = targetPlatform;
|
|
inherit nodeName repoFlake;
|
|
|
|
nodeFlake = self;
|
|
})
|
|
.meta
|
|
.nodeSpecialArgs
|
|
.${nodeName};
|
|
|
|
modules =
|
|
[
|
|
# repoFlake.nixosModules.hardware-x13s
|
|
]
|
|
++ extraModules;
|
|
}
|
|
);
|
|
in {
|
|
lib = {
|
|
inherit mkNixosConfiguration;
|
|
};
|
|
|
|
nixosConfigurations = let
|
|
nodeName = "steveej-x13s";
|
|
in {
|
|
native = mkNixosConfiguration {
|
|
inherit nodeName;
|
|
system = targetPlatform;
|
|
extraModules = [
|
|
./configuration.nix
|
|
];
|
|
};
|
|
|
|
cross = mkNixosConfiguration {
|
|
inherit nodeName;
|
|
extraModules = [
|
|
./configuration.nix
|
|
|
|
{
|
|
nixpkgs.buildPlatform.system = buildPlatform;
|
|
nixpkgs.hostPlatform.system = 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/
|
|
'';
|
|
};
|
|
};
|
|
}
|