about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-28 23:59:52 +0200
committerEmile <git@emile.space>2024-09-28 23:59:52 +0200
commit884cc9b71c7b9ced458867972c68490ddbb5852e (patch)
tree8e64bc7d82609857f27278bb9d17eacdfba3d9fd /nix
parentc0e63070eb11a5308b0870f94eeee56b1fe96dcb (diff)
microvm test stuff
Diffstat (limited to 'nix')
-rw-r--r--nix/lib/flake-helper.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/nix/lib/flake-helper.nix b/nix/lib/flake-helper.nix
index ed5e9ba..dde9256 100644
--- a/nix/lib/flake-helper.nix
+++ b/nix/lib/flake-helper.nix
@@ -3,9 +3,11 @@
   agenix,
   nixpkgs,
   nixpkgs-unstable,
+  nixpkgs-master,
   deploy-rs,
   home-manager,
   darwin,
+  microvm,
   ...
 }@inputs:
 
@@ -20,12 +22,19 @@ rec {
       homeManagerEnable ? false,
       group ? null,
       modules ? [ ],
+      unstable ? false,
+      master ? false,
+      microvms ? false,
       ...
     }:
     let
 
-      # inputs.nixpkgs-${name}, if that doesn't exist, just use nixpkgs
-      localNixpkgs =
+      localNixpkgs = if unstable == true then
+        nixpkgs-unstable
+        else if master == true then
+        nixpkgs-master
+        else
+        # inputs.nixpkgs-${name}, if that doesn't exist, just use nixpkgs
         nixpkgs.lib.attrByPath [ "nixpkgs-${name}" ] # path
           nixpkgs # default
           inputs; # base
@@ -52,14 +61,12 @@ rec {
         modules
         ++ [
 
-          (
-            if system == "x86_64-linux" then
+          (if system == "x86_64-linux" then
               self.nixosModules.x86_64-linux
             else if system == "aarch64-darwin" then
               ({ })
             else
-              null
-          )
+              null)
 
           # a module so that we can access the flake output from inside the
           # flake (yes, I need this for fetching the system type while building the hosts for deploy-rs)