infrastructure/liminix-hive.nix
Ryan Lahfa 3aafc9d272
All checks were successful
lint / check (push) Successful in 27s
build configuration / build_vault01 (pull_request) Successful in 1m8s
build configuration / build_storage01 (pull_request) Successful in 1m13s
build configuration / build_compute01 (pull_request) Successful in 1m19s
build configuration / build_web02 (pull_request) Successful in 52s
build configuration / build_web01 (pull_request) Successful in 1m31s
build configuration / build_rescue01 (pull_request) Successful in 51s
feat: add liminix-rebuild in the shell
Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
2024-03-06 21:28:27 +01:00

45 lines
993 B
Nix

# This is a very rudimentary hive to deploy Liminix images.
{
sources ? import ./npins,
nixpkgs ? sources.nixpkgs,
liminix ? sources.liminix,
}:
let
evalLiminix =
{
config,
device,
output,
}:
{
primary =
(import liminix {
inherit device nixpkgs;
imageType = "primary";
liminix-config = config;
}).outputs.${output};
secondary =
(import liminix {
inherit device nixpkgs;
imageType = "secondary";
liminix-config = config;
}).outputs.${output};
};
zyxel = {
nwa50ax = import "${liminix}/devices/zyxel-nwa50ax";
};
in
{
liminix.pkgs =
(import liminix {
device = zyxel.nwa50ax;
imageType = "primary";
liminix-config = ./machines/ap/configuration.nix;
}).pkgs;
devices = zyxel;
ap-test = evalLiminix {
config = ./machines/ap/configuration.nix;
device = zyxel.nwa50ax;
output = "zyxel-nwa-fit";
};
}