switch to NixTypes system

This commit is contained in:
do butterflies cry? 2026-02-09 09:34:30 +10:00
parent a538a7f9bc
commit 151f093378
3 changed files with 19 additions and 35 deletions

View file

@ -14,7 +14,7 @@
{ {
this, this,
sys, sys,
nib, nt,
lib, lib,
deploy-rs, deploy-rs,
... ...
@ -40,7 +40,7 @@
templateNexus = let templateNexus = let
inherit inherit
(nib.types) (nt.types)
Terminal Terminal
; ;
@ -61,7 +61,7 @@
Cerulean Nexus config must be provided as an attribute set, got "${typeOf nexus}" instead! Cerulean Nexus config must be provided as an attribute set, got "${typeOf nexus}" instead!
Ensure all the `nexus` declaration is an attribute set under your call to `cerulean.mkNexus`. Ensure all the `nexus` declaration is an attribute set under your call to `cerulean.mkNexus`.
'' ''
else nib.parse.overrideStruct templateNexus nexus; else nt.projectOnto templateNexus nexus;
mkNexus' = root: nexus': let mkNexus' = root: nexus': let
nexus = parseNexus nexus'; nexus = parseNexus nexus';

View file

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{nib, ...}: let {nt, ...}: let
inherit inherit
(builtins) (builtins)
isAttrs isAttrs
@ -22,7 +22,7 @@ in rec {
# abstract node instance that stores all default values # abstract node instance that stores all default values
templateNode = name: system: let templateNode = name: system: let
inherit inherit
(nib.types) (nt.types)
Terminal Terminal
; ;
@ -70,7 +70,7 @@ in rec {
else let else let
templateAttrs = templateNode name nodeAttrs.system; templateAttrs = templateNode name nodeAttrs.system;
in in
nib.parse.overrideStruct templateAttrs nodeAttrs; nt.projectOnto templateAttrs nodeAttrs;
mapNodes = nodes: f: mapNodes = nodes: f:
nodes nodes

View file

@ -20,42 +20,26 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nib = { nt = {
url = "github:emilelcb/nib"; url = "github:emilelcb/nt";
# url = "/home/me/agribit/nexus/nib"; inputs = {
inputs.systems.follows = "systems"; systems.follows = "systems";
}; nixpkgs.follows = "nixpkgs";
};
mix = {
url = "github:emilelcb/mix";
# url = "/home/me/agribit/nexus/mix";
inputs.nib.follows = "nib";
}; };
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
}; };
outputs = { outputs = {
self,
nixpkgs, nixpkgs,
nixpkgs-unstable, nt,
nib,
... ...
} @ inputs: let } @ inputs:
inherit import ./cerulean
(nixpkgs) <| inputs
lib // {
; inherit (nixpkgs) lib;
inherit (nt) mix;
sys = nib.mkUSys {
pkgs = nib.withPkgs nixpkgs {
config.allowUnfree = false;
overlays = builtins.attrValues self.overlays;
};
upkgs = nib.withPkgs nixpkgs-unstable {
config.allowUnfree = false;
};
}; };
in
import ./cerulean <| inputs // {inherit lib sys;};
} }