about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-12 04:08:17 +0900
committersefidel <contact@sefidel.net>2024-02-12 04:08:17 +0900
commit1bee1bc7e661d4a22d83e14b6cad021ad6b985b5 (patch)
tree59c711d7d7e7d908cbbdf3c1faee7b60919b9f1d /lib
parentbd96ed61333e5d66f6187ca45fcd79a153803376 (diff)
downloadnixrc-1bee1bc7e661d4a22d83e14b6cad021ad6b985b5.tar.gz
nixrc-1bee1bc7e661d4a22d83e14b6cad021ad6b985b5.zip
feat(lib): add mkHydraFromNixOSConfigurations
Diffstat (limited to 'lib')
-rw-r--r--lib/mk_system.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mk_system.nix b/lib/mk_system.nix
index ba24d21..c9d2705 100644
--- a/lib/mk_system.nix
+++ b/lib/mk_system.nix
@@ -39,4 +39,7 @@
         nodeSpecialArgs = builtins.mapAttrs (_: value: value._module.specialArgs) conf;
       };
     } // builtins.mapAttrs (_: value: { imports = value._module.args.modules; }) conf;
+
+  mkHydraFromNixOSConfigurations = conf:
+    unstable.lib.mapAttrs' (name: value: { name = "nixos-${name}"; value = value.config.system.build.toplevel; }) conf;
 }