summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-07 14:59:01 +0200
committerlassulus <lass@blue.r>2018-09-07 14:59:01 +0200
commit39870dbc4ab8849af41ffdf49bc64d4abea5b4b1 (patch)
tree3c8929a14d1b12eb02dfb8d48a261856f2b7fe57 /lass
parent96c4ab61202f515c7a361ef76c398e542771d6b4 (diff)
l krops: get target as argument
Diffstat (limited to 'lass')
-rw-r--r--lass/1systems/blue/config.nix2
-rw-r--r--lass/krops.nix15
2 files changed, 5 insertions, 12 deletions
diff --git a/lass/1systems/blue/config.nix b/lass/1systems/blue/config.nix
index a84bb37f6..261e53e93 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" -A deploy)
+ $(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" --argstr target "root@$SYSTEM/var/src" -A deploy)
'';
};
diff --git a/lass/krops.nix b/lass/krops.nix
index 776a3a55d..ca3914f53 100644
--- a/lass/krops.nix
+++ b/lass/krops.nix
@@ -1,4 +1,4 @@
-{ config ? config, name }: let
+{ config ? config, name, target}: let
inherit (import ../krebs/krops.nix { inherit name; })
krebs-source
lib
@@ -24,19 +24,12 @@ in {
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
source = source { test = false; };
- target = "root@${name}/var/src";
+ inherit target;
};
# 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; };
- 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));
}