feat: init AP management via Colmena and Liminix #110
2 changed files with 51 additions and 7 deletions
50
hive.nix
50
hive.nix
|
@ -52,11 +52,35 @@ let
|
||||||
|
|
||||||
nodeMeta = meta.nodes.${node};
|
nodeMeta = meta.nodes.${node};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apDevice = import "${sources.liminix}/devices/zyxel-nwa50ax";
|
||||||
|
apOverlay = import "${sources.liminix}/overlay.nix";
|
||||||
|
|
||||||
|
apNixpkgs = import (mkNixpkgs' "unstable") (
|
||||||
|
apDevice.system
|
||||||
|
// {
|
||||||
|
overlays = [ apOverlay ];
|
||||||
|
config = {
|
||||||
|
allowUnsupportedSystem = true; # mipsel
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
"python-2.7.18.8" # Python < 3 is needed for kernel backports.
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
registry = {
|
||||||
|
liminix = {
|
||||||
|
evalConfig = import "${sources.liminix}/lib/eval-config.nix" { inherit (sources) nixpkgs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
nodeNixpkgs = lib.mapSingleFuse (n: nixpkgs.${version n}) nodes;
|
nodeNixpkgs = lib.mapSingleFuse (n: nixpkgs.${version n}) nodes // {
|
||||||
|
ap01 = apNixpkgs;
|
||||||
|
};
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit nixpkgs sources;
|
inherit nixpkgs sources;
|
||||||
|
@ -65,8 +89,8 @@ in
|
||||||
nodeSpecialArgs = lib.mapSingleFuse mkArgs nodes;
|
nodeSpecialArgs = lib.mapSingleFuse mkArgs nodes;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults =
|
registry.nixos.defaults =
|
||||||
{ name, nodeMeta, ... }:
|
{ nodeMeta, name, ... }:
|
||||||
{
|
{
|
||||||
# Import the default modules
|
# Import the default modules
|
||||||
imports = [ ./modules ];
|
imports = [ ./modules ];
|
||||||
|
@ -97,5 +121,25 @@ in
|
||||||
inherit (nodeMeta) stateVersion;
|
inherit (nodeMeta) stateVersion;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ap01 =
|
||||||
|
let
|
||||||
|
device = import "${sources.liminix}/devices/zyxel-nwa50ax";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
deployment.systemType = "liminix";
|
||||||
|
nixpkgs.hostPlatform = {
|
||||||
|
config = "mipsel-unknown-linux-musl";
|
||||||
|
gcc = {
|
||||||
|
abi = "32";
|
||||||
|
arch = "mips32"; # mips32r2?
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs.buildPlatform = "x86_64-linux";
|
||||||
|
imports = [
|
||||||
|
./machines/ap/configuration.nix
|
||||||
|
device.module
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// (lib.mapSingleFuse mkNode nodes)
|
// (lib.mapSingleFuse mkNode nodes)
|
||||||
|
|
|
@ -72,10 +72,10 @@
|
||||||
"owner": "RaitoBezarius",
|
"owner": "RaitoBezarius",
|
||||||
"repo": "liminix"
|
"repo": "liminix"
|
||||||
},
|
},
|
||||||
"branch": "nwa50ax",
|
"branch": "colmena--compat",
|
||||||
"revision": "a4aa10dcc30225a8bb8eb465abfe908629175f2c",
|
"revision": "411a6bc688763fe62d210ccfe066a6cea72a9dce",
|
||||||
"url": "https://github.com/RaitoBezarius/liminix/archive/a4aa10dcc30225a8bb8eb465abfe908629175f2c.tar.gz",
|
"url": "https://github.com/RaitoBezarius/liminix/archive/411a6bc688763fe62d210ccfe066a6cea72a9dce.tar.gz",
|
||||||
"hash": "1m1sc6agg5z65lmyjl48i7sddlwm8d0zgvs8z81iammfy4jpy7qd"
|
"hash": "17wg5288z3085rd4day1qqi1pm0cmibmcm6nrqrgrc1w1iwja9f0"
|
||||||
},
|
},
|
||||||
"linkal": {
|
"linkal": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
|
Loading…
Reference in a new issue