summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/backup.nix9
-rw-r--r--krebs/3modules/default.nix2
-rw-r--r--krebs/4lib/types.nix4
3 files changed, 9 insertions, 6 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 1e926429a..e85a3dfa8 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -120,11 +120,11 @@ let
dst_exec() {
exec ssh -F /dev/null \
-i "$identity" \
- ''${dst_port:+-p $dst_port} \
+ -p $dst_port \
"$dst_user@$dst_host" \
-T "exec$(printf ' %q' "$@")"
}
- rsh="ssh -F /dev/null -i $identity ''${dst_port:+-p $dst_port}"
+ rsh="ssh -F /dev/null -i $identity -p $dst_port"
local_rsync() {
rsync "$@"
}
@@ -146,7 +146,7 @@ let
dst_exec() {
exec "$@"
}
- rsh="ssh -F /dev/null -i $identity ''${src_port:+-p $src_port}"
+ rsh="ssh -F /dev/null -i $identity -p $src_port"
local_rsync() {
mkdir -m 0700 -p ${shell.escape plan.dst.path}/current
flock -n ${shell.escape plan.dst.path} rsync "$@"
@@ -231,6 +231,9 @@ let
${concatStringsSep ";;\n" (mapAttrsToList
(_: net: "(${head net.aliases}) echo ${toString net.ssh.port}")
host.nets)};;
+ (*)
+ echo network-ssh-port: unhandled case: ${word} >&2
+ exit 1
esac
'';
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index be530d46f..10c61b63a 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -218,7 +218,7 @@ let
(filter (hasSuffix ".${cfg.search-domain}")
longs);
add-port = a:
- if net.ssh.port != null
+ if net.ssh.port != 22
then "[${a}]:${toString net.ssh.port}"
else a;
in
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index f46491801..405a91e45 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -117,8 +117,8 @@ types // rec {
type = submodule {
options = {
port = mkOption {
- type = nullOr int;
- default = null;
+ type = int;
+ default = 22;
};
};
};