From d63751578aca6a33cfcea39b6d372b5991293f6b Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 10 Dec 2024 13:38:44 +0100 Subject: [PATCH] fix(HACK): not broken anymore --- hive.nix | 8 ++++++-- lib/netconf-junos/default.nix | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hive.nix b/hive.nix index 11aabbc..d0ee857 100644 --- a/hive.nix +++ b/hive.nix @@ -126,10 +126,11 @@ in }; netconf = { - evalConfig = args: (import nixpkgs.nixos.unstable.path { }).lib.evalModules args; + evalConfig = + args: (import nixpkgs.nixos.unstable.path { }).lib.evalModules (builtins.trace args.modules args); defaults = - { nodePath, ... }: + { nodeMeta, nodePath, ... }: { # Import the default modules imports = [ @@ -137,7 +138,10 @@ in ./${nodePath}.nix ./modules/netconf ./lib/netconf-junos + "${sources.nixpkgs}/nixos/modules/misc/assertions.nix" ]; + + inherit (nodeMeta) deployment; }; }; diff --git a/lib/netconf-junos/default.nix b/lib/netconf-junos/default.nix index 09ac275..70ac56d 100644 --- a/lib/netconf-junos/default.nix +++ b/lib/netconf-junos/default.nix @@ -7,6 +7,7 @@ let attrsOf bool str + any submodule ; @@ -30,6 +31,11 @@ in ]; options = { + # Hack because of this https://git.dgnum.eu/DGNum/colmena/src/commit/71b1b660f2cda2e34e134d0028cafbd56bb22008/src/nix/hive/eval.nix#L166 which defines nixpkgs option but we don't have it here. What about liminix ? + nixpkgs = mkOption { + type = attrsOf any; + default = { }; + }; netconf.xmls.configuration = mkOption { type = str; readOnly = true;