From 41ca207b4108ae029131720184c249023ce18f2e Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sun, 12 May 2024 23:25:26 +0200 Subject: [PATCH] feat: wip! wip! wip! --- hive.nix | 50 +++++++++++++++++++++++++++++++++++++++++++--- npins/sources.json | 8 ++++---- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/hive.nix b/hive.nix index 1f53919..85968cd 100644 --- a/hive.nix +++ b/hive.nix @@ -52,11 +52,35 @@ let 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 { + registry = { + liminix = { + evalConfig = import "${sources.liminix}/lib/eval-config.nix" { inherit (sources) nixpkgs; }; + }; + }; + meta = { - nodeNixpkgs = lib.mapSingleFuse (n: nixpkgs.${version n}) nodes; + nodeNixpkgs = lib.mapSingleFuse (n: nixpkgs.${version n}) nodes // { + ap01 = apNixpkgs; + }; specialArgs = { inherit nixpkgs sources; @@ -65,8 +89,8 @@ in nodeSpecialArgs = lib.mapSingleFuse mkArgs nodes; }; - defaults = - { name, nodeMeta, ... }: + registry.nixos.defaults = + { nodeMeta, name, ... }: { # Import the default modules imports = [ ./modules ]; @@ -97,5 +121,25 @@ in 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) diff --git a/npins/sources.json b/npins/sources.json index 3db1163..ae566c9 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -72,10 +72,10 @@ "owner": "RaitoBezarius", "repo": "liminix" }, - "branch": "nwa50ax", - "revision": "a4aa10dcc30225a8bb8eb465abfe908629175f2c", - "url": "https://github.com/RaitoBezarius/liminix/archive/a4aa10dcc30225a8bb8eb465abfe908629175f2c.tar.gz", - "hash": "1m1sc6agg5z65lmyjl48i7sddlwm8d0zgvs8z81iammfy4jpy7qd" + "branch": "colmena--compat", + "revision": "411a6bc688763fe62d210ccfe066a6cea72a9dce", + "url": "https://github.com/RaitoBezarius/liminix/archive/411a6bc688763fe62d210ccfe066a6cea72a9dce.tar.gz", + "hash": "17wg5288z3085rd4day1qqi1pm0cmibmcm6nrqrgrc1w1iwja9f0" }, "linkal": { "type": "Git",