diff options
author | Alan Pearce | 2024-11-27 18:37:24 +0100 |
---|---|---|
committer | Alan Pearce | 2024-11-27 18:37:24 +0100 |
commit | 3b1859a23ebee5f4259dad99fcd821ac93e34cbf (patch) | |
tree | fd7833107b8c35dc0eddf3cbdc41bde4d9d2a97b /flake.nix | |
parent | c34ea57e6061273ec1356f76593c64d60e893019 (diff) | |
download | nixfiles-3b1859a23ebee5f4259dad99fcd821ac93e34cbf.tar.lz nixfiles-3b1859a23ebee5f4259dad99fcd821ac93e34cbf.tar.zst nixfiles-3b1859a23ebee5f4259dad99fcd821ac93e34cbf.zip |
Revert "remove deploy-rs"
This reverts commit 57f5b19cc2df28e075cd7fb3bf2c9d3d3ed551bc.
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 41 |
1 files changed, 40 insertions, 1 deletions
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" |