summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix73
1 files changed, 68 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 3af5b41..5485ed9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,16 +4,71 @@
   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
+    disko = {
+      url = "github:nix-community/disko";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+      };
+    };
+    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";
       };
     };
   };
@@ -21,7 +76,13 @@
   outputs = {
     self,
     nixpkgs,
+    # modules
     simple-nixos-mailserver,
+    impermanence,
+    disko,
+    agenix,
+    # bins
+    ragenix,
     ...
   } @ attrs: let
     system = "x86_64-linux";
@@ -33,9 +94,9 @@
       modules = [
         ./hosts/server1/configuration.nix
         simple-nixos-mailserver.nixosModule
-        {
-          mailserver = import ./system/mail {inherit (pkgs) lib;};
-        }
+        disko.nixosModules.default
+        impermanence.nixosModules.impermanence
+        agenix.nixosModules.default
       ];
     };
     devShells."${system}" = {
@@ -48,9 +109,11 @@
           ltex-ls
           cocogitto
           git-crypt
+          ragenix.packages."${system}".default
         ];
       };
     };
   };
 }
 # vim: ts=2
+