From da314123239df209f0b46e20c4d4dc91980f06cf Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 9 Jan 2024 01:39:36 +0100 Subject: [PATCH] fix: avoid endlessly compiling deploy-rs --- lib/deploy.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/deploy.nix b/lib/deploy.nix index 65fd5a5e..3d4033db 100644 --- a/lib/deploy.nix +++ b/lib/deploy.nix @@ -8,6 +8,16 @@ lib, inputs, }: let + # https://github.com/serokell/deploy-rs#overall-usage + system = "x86_64-linux"; + pkgs = import inputs.nixpkgs { inherit system; }; + deployPkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + inputs.deploy-rs.overlay + (self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; }) + ]; + }; getFqdn = c: let net = c.config.networking; fqdn = @@ -55,7 +65,7 @@ in { hostname = getFqdn c; profiles.system = { user = "root"; - path = inputs.deploy-rs.lib.${c.pkgs.stdenv.hostPlatform.system}.activate.nixos c; + path = deployPkgs.deploy-rs.lib.activate.nixos c; }; } )