From e712fd45153cc32d32b56fc1eead4f81e6993050 Mon Sep 17 00:00:00 2001 From: b12f Date: Wed, 14 Aug 2024 10:35:17 +0200 Subject: [PATCH] deploy: take deploy-rs from cache --- lib/deploy.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/deploy.nix b/lib/deploy.nix index 5e9f641..ff01300 100644 --- a/lib/deploy.nix +++ b/lib/deploy.nix @@ -49,11 +49,23 @@ in { lib.recursiveUpdate (lib.mapAttrs ( - _: c: { + _: c: let + system = c.pkgs.stdenv.hostPlatform.system; + # Unmodified nixpkgs + pkgs = import inputs.nixpkgs { inherit system; }; + # nixpkgs with deploy-rs overlay but force the nixpkgs package + deployPkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + inputs.deploy-rs.overlay # or deploy-rs.overlays.default + (self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; }) + ]; + }; + 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; }; } )