shell.nix: use host pattern
This commit is contained in:
parent
2e46b74994
commit
eef85f4322
1 changed files with 6 additions and 4 deletions
10
shell.nix
10
shell.nix
|
@ -117,8 +117,10 @@ let
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hostPattern = name: "${name}.private";
|
||||||
|
|
||||||
serverDeployment = name:
|
serverDeployment = name:
|
||||||
{ host ? "${name}.private", user ? "root" }:
|
{ host ? (hostPattern name), user ? "root" }:
|
||||||
with ops;
|
with ops;
|
||||||
jobs "deploy-${name}" "${user}@${host}" [
|
jobs "deploy-${name}" "${user}@${host}" [
|
||||||
(populateTmpfs (source.keys name))
|
(populateTmpfs (source.keys name))
|
||||||
|
@ -130,7 +132,7 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
serverPushSecrets = name:
|
serverPushSecrets = name:
|
||||||
{ host ? "${name}.private", user ? "root" }:
|
{ host ? (hostPattern name), user ? "root" }:
|
||||||
with ops;
|
with ops;
|
||||||
jobs "push-${name}" "${user}@${host}" [
|
jobs "push-${name}" "${user}@${host}" [
|
||||||
(populateTmpfs (source.keys name))
|
(populateTmpfs (source.keys name))
|
||||||
|
@ -138,7 +140,7 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopDeployment = name:
|
desktopDeployment = name:
|
||||||
{ host ? "${name}.private", target ? "/var/src/", user ? "root"
|
{ host ? (hostPattern name), target ? "/var/src/", user ? "root"
|
||||||
, commandPrefix ? "deploy", enableSwitch ? true }:
|
, commandPrefix ? "deploy", enableSwitch ? true }:
|
||||||
with ops;
|
with ops;
|
||||||
jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ([
|
jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ([
|
||||||
|
@ -152,7 +154,7 @@ let
|
||||||
cleanupNix = name:
|
cleanupNix = name:
|
||||||
let
|
let
|
||||||
target = {
|
target = {
|
||||||
host = "${name}.private";
|
host = hostPattern name;
|
||||||
user = "root";
|
user = "root";
|
||||||
port = "22";
|
port = "22";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue