From eef85f4322d57ef9b3f0e1e00d21db60e3ca3574 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 4 Jan 2020 18:00:17 +1300 Subject: [PATCH] shell.nix: use host pattern --- shell.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shell.nix b/shell.nix index 59b331e..2c45f35 100644 --- a/shell.nix +++ b/shell.nix @@ -117,8 +117,10 @@ let }; + hostPattern = name: "${name}.private"; + serverDeployment = name: - { host ? "${name}.private", user ? "root" }: + { host ? (hostPattern name), user ? "root" }: with ops; jobs "deploy-${name}" "${user}@${host}" [ (populateTmpfs (source.keys name)) @@ -130,7 +132,7 @@ let ]; serverPushSecrets = name: - { host ? "${name}.private", user ? "root" }: + { host ? (hostPattern name), user ? "root" }: with ops; jobs "push-${name}" "${user}@${host}" [ (populateTmpfs (source.keys name)) @@ -138,7 +140,7 @@ let ]; desktopDeployment = name: - { host ? "${name}.private", target ? "/var/src/", user ? "root" + { host ? (hostPattern name), target ? "/var/src/", user ? "root" , commandPrefix ? "deploy", enableSwitch ? true }: with ops; jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ([ @@ -152,7 +154,7 @@ let cleanupNix = name: let target = { - host = "${name}.private"; + host = hostPattern name; user = "root"; port = "22"; };