From b6c00e74e7c6e574ee72d40141a36adff2ebeccc Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Mon, 26 Apr 2021 19:33:31 -0700 Subject: [PATCH] set add self and hosts module arguments --- lib/modules.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/modules.nix b/lib/modules.nix index 2cd965ff..6e2a3525 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -41,6 +41,12 @@ } ''; + _module.args = { + inherit self; + hosts = builtins.mapAttrs (_: host: host.config) + (removeAttrs self.nixosConfigurations [ config.networking.hostName ]); + }; + system.configurationRevision = lib.mkIf (self ? rev) self.rev; };