From 3b1859a23ebee5f4259dad99fcd821ac93e34cbf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 27 Nov 2024 18:37:24 +0100 Subject: Revert "remove deploy-rs" This reverts commit 57f5b19cc2df28e075cd7fb3bf2c9d3d3ed551bc. --- flake.nix | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index d0853ec4..c0137b59 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ utils.url = "github:numtide/flake-utils"; agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; + deploy-rs.url = "github:serokell/deploy-rs"; personal = { url = "git+file:packages"; inputs.nixpkgs.follows = "nixpkgs"; @@ -45,6 +46,7 @@ , secrets , agenix , personal + , deploy-rs , searchix , golink , ... @@ -158,7 +160,44 @@ (secrets + "/default.nix") ]; }; - }; + + checks = builtins.mapAttrs + (system: deployLib: + deployLib.deployChecks self.deploy) + deploy-rs.lib; + + deploy = { + remoteBuild = true; + interactiveSudo = true; + nodes.linde = { + hostname = "linde"; + profiles.system = { + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos + self.nixosConfigurations.linde; + }; + profiles.alan = { + user = "alan"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@linde"; + }; + }; + }; + } // utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = { + default = pkgs.mkShell { + packages = [ + deploy-rs.packages.${system}.default + agenix.packages.${system}.default + ]; + }; + }; + }); + + nixConfig = { extra-substituters = [ "https://toyvo.cachix.org" -- cgit 1.4.1