I'm trying to implement some new features to nixos-deploy-network, but I stumbled upon some obscurities in the NixOS module system. that I don't completely understand. Apparently, if I run the eval-config function with some modules which aren't files, they won't get evaluated, unless a key attribute is given:
For example, if I try this: import /etc/nixos/nixos/lib/eval-config.nix { ... modules = [ /etc/nixos/configuration.nix { foo = "bar"; } # Does not get evaluated } The latter attribute set (which should trigger an error), isn't evaluated. If I add a key to it: import /etc/nixos/nixos/lib/eval-config.nix { ... modules = [ /etc/nixos/configuration.nix { foo = "bar"; # Now it gets evaluated! key = "some-key"; # Because a key is given } } It will get evaluated! What I want is to avoid specifying the usage of these key attributes. The reason why I want this is because I want to adapt nixos-deploy-network to accept multiple network expressions that are zipped together. Because of the key requirement, the second NixOS network expression won't get evaluated (unless I manually specify key attributes, which isn't very nice). Anyone an idea/suggestion how to deal with this issue?
_______________________________________________ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev