ma krops: add buildTarget

This commit is contained in:
makefu 2021-03-12 20:35:48 +01:00
parent fe393ec4e7
commit aa1b8ed563
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,4 +1,4 @@
{ config ? config, name, target ? name }: let
{ config ? config, name, target ? name , buildTarget ? target }: let
krops = ../submodules/krops;
nixpkgs-src = lib.importJSON ../krebs/nixpkgs.json;
@ -87,6 +87,7 @@ in {
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
source = source { test = false; };
target = "root@${target}/var/src";
buildTarget = if target == buildTarget then "root@${target}/var/src" else "root@${buildTarget}/tmp/";
};
# usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test)