summary refs log tree commit diff
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
parentb115e4c9929e843eb45b9e0f87ff69e85a8e9f64 (diff)
downloadminerals-a19244538e81f9be6080ad4f3a665301eaf5df14.tar.zst
minerals-a19244538e81f9be6080ad4f3a665301eaf5df14.zip
Add unconfigured agenix flake
Signed-off-by: Mel <einebeere@gmail.com>
-rw-r--r--flake.lock63
-rw-r--r--flake.nix24
-rw-r--r--modules/common.nix2
3 files changed, 82 insertions, 7 deletions
diff --git a/flake.lock b/flake.lock
index e20833c..a0a591b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,52 @@
 {
   "nodes": {
+    "agenix": {
+      "inputs": {
+        "darwin": "darwin",
+        "home-manager": [
+          "home-manager"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1723293904,
+        "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
+        "owner": "ryantm",
+        "repo": "agenix",
+        "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
+        "type": "github"
+      },
+      "original": {
+        "owner": "ryantm",
+        "repo": "agenix",
+        "type": "github"
+      }
+    },
+    "darwin": {
+      "inputs": {
+        "nixpkgs": [
+          "agenix",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1700795494,
+        "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
+        "owner": "lnl7",
+        "repo": "nix-darwin",
+        "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "lnl7",
+        "ref": "master",
+        "repo": "nix-darwin",
+        "type": "github"
+      }
+    },
     "flake-compat": {
       "locked": {
         "lastModified": 1696426674,
@@ -70,11 +117,27 @@
     },
     "root": {
       "inputs": {
+        "agenix": "agenix",
         "flake-compat": "flake-compat",
         "home-manager": "home-manager",
         "nixpkgs": "nixpkgs",
         "nixpkgs-unstable": "nixpkgs-unstable"
       }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
     }
   },
   "root": "root",
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
         ];
       }
     );
diff --git a/modules/common.nix b/modules/common.nix
index d333ec4..f263fb8 100644
--- a/modules/common.nix
+++ b/modules/common.nix
@@ -62,7 +62,7 @@
 
   environment.systemPackages = (with pkgs; [
     file unzip jq dig htop wget
-    gnupg pinentry-gnome3 age minisign
+    gnupg pinentry-gnome3 age agenix minisign
     inetutils arp-scan pciutils lshw lsof inxi iw pmutils acpi acpid
     sysprof wireshark hardinfo remmina
     vlc celluloid foliate calibre