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:
|
||||
{ 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";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue