diff options
author | lassulus <lass@blue.r> | 2018-09-07 17:35:41 +0200 |
---|---|---|
committer | lassulus <lass@blue.r> | 2018-09-07 17:35:41 +0200 |
commit | 293dada1cd44d23249697cb7c86d0a12f34c0e0d (patch) | |
tree | 47fea2e619ef9fd226f35c1d06f986e3c92422a1 /lass | |
parent | f8a594cff85af8e19fa3aa7e6159004105285142 (diff) |
Revert "l krops: get target as argument"
This reverts commit 39870dbc4ab8849af41ffdf49bc64d4abea5b4b1.
Diffstat (limited to 'lass')
-rw-r--r-- | lass/1systems/blue/config.nix | 2 | ||||
-rw-r--r-- | lass/krops.nix | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lass/1systems/blue/config.nix b/lass/1systems/blue/config.nix index 261e53e93..a84bb37f6 100644 --- a/lass/1systems/blue/config.nix +++ b/lass/1systems/blue/config.nix @@ -16,7 +16,7 @@ with import <stockholm/lib>; deploy = pkgs.writeDash "deploy" '' set -eu export SYSTEM="$1" - $(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" --argstr target "root@$SYSTEM/var/src" -A deploy) + $(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy) ''; }; diff --git a/lass/krops.nix b/lass/krops.nix index c12c0925c..5111730ed 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -1,4 +1,4 @@ -{ config ? config, name, target}: let +{ config ? config, name }: let inherit (import ../krebs/krops.nix { inherit name; }) krebs-source lib @@ -24,12 +24,19 @@ in { # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) deploy = pkgs.krops.writeDeploy "${name}-deploy" { source = source { test = false; }; - inherit target; + target = "root@${name}/var/src"; }; # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test) - ci = pkgs.krops.writeTest "${name}-test" { + test = pkgs.krops.writeTest "${name}-test" { source = source { test = true; }; - inherit target; + target = "${lib.getEnv "HOME"}/tmp/${name}-krops-test-src"; }; + + 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)); } |