2023-08-10 21:45:49 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-08-22 10:20:16 +02:00
|
|
|
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs.url = "github:steveej-forks/nixpkgs/hostapd-fix";
|
2023-08-10 21:45:49 +02:00
|
|
|
|
|
|
|
get-flake.url = "github:ursi/get-flake";
|
|
|
|
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
disko.url = "github:nix-community/disko";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
srvos.url = "github:numtide/srvos";
|
|
|
|
srvos.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
bpir3.url = "github:nakato/nixos-bpir3-example";
|
|
|
|
bpir3.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
nixos-nftables-firewall.url = "github:thelegy/nixos-nftables-firewall";
|
|
|
|
nixos-nftables-firewall.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
# outputs = _: {};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
get-flake,
|
|
|
|
nixpkgs,
|
|
|
|
bpir3,
|
|
|
|
...
|
|
|
|
} @ attrs: let
|
|
|
|
system = "aarch64-linux";
|
|
|
|
nodeName = "router0-dmz0";
|
|
|
|
|
|
|
|
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
|
|
|
|
nixpkgs.lib.nixosSystem (
|
|
|
|
nixpkgs.lib.attrsets.recursiveUpdate
|
|
|
|
attrs
|
|
|
|
{
|
|
|
|
specialArgs = {
|
|
|
|
nodeFlake = self;
|
|
|
|
repoFlake = get-flake ../../../..;
|
|
|
|
inherit nodeName;
|
|
|
|
inherit
|
|
|
|
(bpir3.packages.${system})
|
|
|
|
armTrustedFirmwareMT7986
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./configuration.nix
|
|
|
|
|
|
|
|
# flake registry
|
|
|
|
{
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(final: previous: let
|
|
|
|
bpir3Pkgs = previous.callPackage "${bpir3}/pkgs" {};
|
|
|
|
in {
|
|
|
|
inherit
|
|
|
|
(bpir3Pkgs)
|
|
|
|
linuxPackages_bpir3
|
|
|
|
;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|
|
|
|
]
|
|
|
|
++ extraModules;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
|
|
|
native = mkNixosConfiguration {
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
|
|
|
|
cross = mkNixosConfiguration {
|
|
|
|
extraModules = [
|
|
|
|
{
|
|
|
|
nixpkgs.buildPlatform.system = "x86_64-linux";
|
|
|
|
nixpkgs.hostPlatform.system = system;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|