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.nix27
1 files changed, 22 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index a462584..a4ba578 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,9 @@
         nixpkgs.follows = "nixpkgs";
       };
     };
+    deploy-rs = {
+      url = "github:serokell/deploy-rs";
+    };
 
     # inputs for following
     systems = {
@@ -84,6 +87,7 @@
     nixpkgs-unstable,
     library,
     treefmt-nix,
+    deploy-rs,
     # modules
     simple-nixos-mailserver,
     impermanence,
@@ -121,10 +125,13 @@
   in {
     nixosConfigurations = hosts;
 
-    checks."${system}" = nixLib.warnMerge tests {
-      formatting =
-        treefmtEval.config.build.check self;
-    } "the flake checks";
+    checks."${system}" =
+      nixLib.warnMerge (nixLib.warnMerge tests {
+        formatting =
+          treefmtEval.config.build.check self;
+      } "the flake checks and formatting")
+      (deploy-rs.lib."${system}".deployChecks self.deploy)
+      "the flake checks and deploy-rs";
 
     packages."${system}" = vhackPackages;
     formatter."${system}" = treefmtEval.config.build.wrapper;
@@ -135,12 +142,22 @@
           # used for certificate generation in the taskserver setup
           gnutls
 
+          pkgs.deploy-rs
+
           git-bug
 
           cocogitto
-          # ragenix.packages."${system}".default
+          ragenix.packages."${system}".default
         ];
       };
     };
+
+    deploy.nodes.server2 = {
+      hostname = "server2.vhack.eu";
+      profiles.system = {
+        user = "root";
+        path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.server2;
+      };
+    };
   };
 }