summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-07-08 15:34:45 +0200
committerSoispha <soispha@vhack.eu>2023-07-08 16:01:57 +0200
commit78b566e8bafa61bd9d7dbcbbc11ad568982c2389 (patch)
treeb6a506e719f3037c41568f290527b24a21ea95f8 /flake.nix
parentFix(system/services/nix-sync): Nix build needs access to /proc/stat (diff)
downloadnixos-server-78b566e8bafa61bd9d7dbcbbc11ad568982c2389.tar.gz
nixos-server-78b566e8bafa61bd9d7dbcbbc11ad568982c2389.zip
Feat(flake): Add agenix module
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix56
1 files changed, 52 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 0cf5609..5485ed9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,10 +4,35 @@
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";
 
-    systems.url = "github:nix-systems/x86_64-linux";
+    # inputs for following
+    systems = {
+      url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
+    };
+    flake-compat = {
+      url = "github:edolstra/flake-compat";
+      flake = false;
+    };
+    crane = {
+      url = "github:ipetkov/crane";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+        flake-compat.follows = "flake-compat";
+        flake-utils.follows = "flake-utils";
+        rust-overlay.follows = "rust-overlay";
+      };
+    };
     flake-utils = {
       url = "github:numtide/flake-utils";
-      inputs.systems.follows = "systems";
+      inputs = {
+        systems.follows = "systems";
+      };
+    };
+    rust-overlay = {
+      url = "github:oxalica/rust-overlay";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+        flake-utils.follows = "flake-utils";
+      };
     };
 
     # modules
@@ -17,15 +42,33 @@
         nixpkgs.follows = "nixpkgs";
       };
     };
-    impermanence = {
-      url = "github:nix-community/impermanence";
+    agenix = {
+      url = "github:ryantm/agenix";
       inputs = {
+        nixpkgs.follows = "nixpkgs";
       };
     };
+    impermanence = {
+      url = "github:nix-community/impermanence";
+      inputs = {};
+    };
     simple-nixos-mailserver = {
       url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.05";
       inputs = {
         nixpkgs.follows = "nixpkgs";
+        flake-compat.follows = "flake-compat";
+      };
+    };
+
+    # bins
+    ragenix = {
+      url = "github:yaxitech/ragenix";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+        agenix.follows = "agenix";
+        flake-utils.follows = "flake-utils";
+        rust-overlay.follows = "rust-overlay";
+        crane.follows = "crane";
       };
     };
   };
@@ -37,6 +80,9 @@
     simple-nixos-mailserver,
     impermanence,
     disko,
+    agenix,
+    # bins
+    ragenix,
     ...
   } @ attrs: let
     system = "x86_64-linux";
@@ -50,6 +96,7 @@
         simple-nixos-mailserver.nixosModule
         disko.nixosModules.default
         impermanence.nixosModules.impermanence
+        agenix.nixosModules.default
       ];
     };
     devShells."${system}" = {
@@ -62,6 +109,7 @@
           ltex-ls
           cocogitto
           git-crypt
+          ragenix.packages."${system}".default
         ];
       };
     };