about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-10 07:16:59 +0900
committersefidel <contact@sefidel.net>2024-02-10 07:24:11 +0900
commit4f9c169b34f69c5cda866a4605d05c4bb09196ae (patch)
treee7d3f8d78c867e6b980c3e121a00a53350df227d /flake.nix
parent612e5150fbe3419d5c556c9cbe974ba7541e5f32 (diff)
downloadnixrc-4f9c169b34f69c5cda866a4605d05c4bb09196ae.tar.gz
nixrc-4f9c169b34f69c5cda866a4605d05c4bb09196ae.zip
feat(modules): add hydra
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 18ca831..ecc05a7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,6 +23,11 @@
     sops-nix.url = "github:Mic92/sops-nix";
     sops-nix.inputs.nixpkgs.follows = "unstable";
 
+    flake-compat.url = "github:edolstra/flake-compat";
+    flake-compat.flake = false;
+
+    hydra.url = "github:NixOS/hydra";
+
     neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
     neovim-nightly.inputs.nixpkgs.follows = "unstable";
 
@@ -38,10 +43,10 @@
   };
 
   outputs = { self, unstable, ... } @ inputs:
-  let
-    lib = unstable.lib.extend
-      (self: super: { my = import ./lib { inherit inputs; lib = self; }; });
-  in
+    let
+      lib = unstable.lib.extend
+        (self: super: { my = import ./lib { inherit inputs; lib = self; }; });
+    in
     {
       nixosConfigurations = import ./nixos inputs;
 
@@ -50,5 +55,14 @@
       colmena = self.lib.mkColmenaFromNixOSConfigurations self.nixosConfigurations;
 
       lib = lib.my;
+
+      hydraJobs = lib.mapAttrs' (name: pname: {
+        name = pname;
+        value = self.nixosConfigurations.${name}.config.system.build.toplevel;
+      }) (lib.genAttrs (builtins.attrNames self.nixosConfigurations) (name: "nixos-${name}"));
+      # // lib.mapAttrs' (name: pname: {
+      #   name = pname;
+      #   value = self.homeConfigurations.${name}.activationPackage;
+      # }) (lib.genAttrs (builtins.attrNames self.homeConfigurations) (name: "home-${name}"));
     };
 }