l krops: get target as argument
This commit is contained in:
parent
96c4ab6120
commit
39870dbc4a
@ -16,7 +16,7 @@ with import <stockholm/lib>;
|
|||||||
deploy = pkgs.writeDash "deploy" ''
|
deploy = pkgs.writeDash "deploy" ''
|
||||||
set -eu
|
set -eu
|
||||||
export SYSTEM="$1"
|
export SYSTEM="$1"
|
||||||
$(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy)
|
$(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" --argstr target "root@$SYSTEM/var/src" -A deploy)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config ? config, name }: let
|
{ config ? config, name, target}: let
|
||||||
inherit (import ../krebs/krops.nix { inherit name; })
|
inherit (import ../krebs/krops.nix { inherit name; })
|
||||||
krebs-source
|
krebs-source
|
||||||
lib
|
lib
|
||||||
@ -24,19 +24,12 @@ in {
|
|||||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
|
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
|
||||||
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
|
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
|
||||||
source = source { test = false; };
|
source = source { test = false; };
|
||||||
target = "root@${name}/var/src";
|
inherit target;
|
||||||
};
|
};
|
||||||
|
|
||||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
|
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
|
||||||
test = pkgs.krops.writeTest "${name}-test" {
|
ci = pkgs.krops.writeTest "${name}-test" {
|
||||||
source = source { test = true; };
|
source = source { test = true; };
|
||||||
target = "${lib.getEnv "HOME"}/tmp/${name}-krops-test-src";
|
inherit target;
|
||||||
};
|
};
|
||||||
|
|
||||||
ci = map (host:
|
|
||||||
pkgs.krops.writeTest "${host.name}-test" {
|
|
||||||
source = source { test = true; };
|
|
||||||
target = "${lib.getEnv "TMPDIR"}/lass/${host.name}";
|
|
||||||
}
|
|
||||||
) (lib.filter (host: lib.getAttr "ci" host && host.owner == "lass") (lib.attrValues config.krebs.hosts));
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user