about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-12 04:08:41 +0900
committersefidel <contact@sefidel.net>2024-02-12 04:08:41 +0900
commit1667225338871c538eca3d68b401c0dfe5e5071d (patch)
treee9d100d90869d026c91e7b748c35765421400ba9
parent1bee1bc7e661d4a22d83e14b6cad021ad6b985b5 (diff)
downloadnixrc-1667225338871c538eca3d68b401c0dfe5e5071d.tar.gz
nixrc-1667225338871c538eca3d68b401c0dfe5e5071d.zip
feat(lib): add mkHydraFromHomeConfigurations
-rw-r--r--lib/mk_home.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mk_home.nix b/lib/mk_home.nix
index 8e63324..d416787 100644
--- a/lib/mk_home.nix
+++ b/lib/mk_home.nix
@@ -1,4 +1,4 @@
-{ self, home-manager, ... } @ inputs:
+{ self, home-manager, unstable, ... } @ inputs:
 {
   mkHome = { username, hostname, pkgs, version, extraModules ? null }:
     let
@@ -27,4 +27,7 @@
         entrypoint
       ] ++ pkgs.lib.optionals (extraModules != null) extraModules;
     };
+
+  mkHydraFromHomeConfigurations = conf:
+    unstable.lib.mapAttrs' (name: value: { name = "home-${name}"; value = value.activationPackage; }) conf;
 }