Skip to content

Commit

Permalink
feat: introduce special args
Browse files Browse the repository at this point in the history
This is based on #190, specifically
633852a.

Co-authored-by: Dusk Banks <[email protected]>
Signed-off-by: Christina Sørensen <[email protected]>
  • Loading branch information
cafkafk and bb010g committed Sep 17, 2024
1 parent d13c3d6 commit f3f1b2e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion data/eval-machines.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ let
nwPkgs = network.network.pkgs or { };
lib = network.network.lib or nwPkgs.lib or (import <nixpkgs/lib>);
evalConfig =
network.network.evalConfig or ((nwPkgs.path or <nixpkgs>) + "/nixos/lib/eval-config.nix");
let
evalConfig' =
network.network.evalConfig or ((nwPkgs.path or <nixpkgs>) + "/nixos/lib/eval-config.nix");
in
if lib.isFunction evalConfig' then evalConfig' else import evalConfig';
specialArgs = network.specialArgs or { };
runCommand = network.network.runCommand or nwPkgs.runCommand or (import <nixpkgs> { }).runCommand;
in
with lib;
Expand Down Expand Up @@ -77,6 +82,7 @@ rec {
map (machineName: {
name = machineName;
value = import evalConfig {
inherit specialArgs;
# Force decide system in module system
system = null;
modules = modules {
Expand All @@ -93,6 +99,7 @@ rec {
map (machineName: {
name = machineName;
value = import evalConfig {
inherit specialArgs;
# Force decide system in module system
system = null;
modules = modules {
Expand Down

0 comments on commit f3f1b2e

Please sign in to comment.