summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-11-17 10:43:45 +0100
committerMel <einebeere@gmail.com>2024-11-17 10:43:45 +0100
commita19244538e81f9be6080ad4f3a665301eaf5df14 (patch)
tree2320812a5c5646e4c3915c9b5b5c5de5443693a5 /flake.nix
parentb115e4c9929e843eb45b9e0f87ff69e85a8e9f64 (diff)
downloadminerals-a19244538e81f9be6080ad4f3a665301eaf5df14.tar.zst
minerals-a19244538e81f9be6080ad4f3a665301eaf5df14.zip
Add unconfigured agenix flake
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix24
1 files changed, 18 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 25e94d1..8cef25b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,10 +9,16 @@
       inputs.nixpkgs.follows = "nixpkgs";
     };
 
+    agenix = {
+      url = "github:ryantm/agenix";
+      inputs.nixpkgs.follows = "nixpkgs";
+      inputs.home-manager.follows = "home-manager";
+    };
+
     flake-compat.url = "github:edolstra/flake-compat";
   };
 
-  outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
+  outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, ... }:
   let
     system = "x86_64-linux";
 
@@ -20,12 +26,16 @@
       "graphite"
       "bismuth"
     ];
-    
+
+    overlays = [ agenix.overlays.default ];
+
     packageSets = let
-      pkgsInputs = { inherit system; config = import ./config.nix; };
+      commonPkgsInputs = { inherit system; config = import ./config.nix; };
     in rec {
-      pkgs = import nixpkgs pkgsInputs;
-      unstablePkgs = import nixpkgs-unstable pkgsInputs;
+      pkgs = import nixpkgs (commonPkgsInputs // { inherit overlays; });
+
+      unstablePkgs = import nixpkgs-unstable commonPkgsInputs;
+
       auxiliaryPkgs = import ./pkgs { inherit pkgs unstablePkgs; };
     };
 
@@ -40,12 +50,14 @@
 
         modules = [
           ./machines/${machine}
-        
+
           home-manager.nixosModules.home-manager {
             home-manager.useGlobalPkgs = true;
             home-manager.useUserPackages = true;
             home-manager.users.mel = import ./machines/${machine}/home.nix;
           }
+
+          agenix.nixosModules.default
         ];
       }
     );