summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/backup.nix8
-rw-r--r--krebs/3modules/repo-sync.nix2
2 files changed, 7 insertions, 3 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index c0b218c15..910324f3c 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -226,10 +226,14 @@ let
# XXX Is one ping enough to determine fastest address?
fastest-address = host: ''
- { ${pkgs.fping}/bin/fping </dev/null -a \
+ { ${pkgs.fping}/bin/fping </dev/null -a -e \
${concatMapStringsSep " " shell.escape
(mapAttrsToList (_: net: head net.aliases) host.nets)} \
- | ${pkgs.coreutils}/bin/head -1; }
+ | ${pkgs.gnused}/bin/sed -r 's/^(\S+) \(([0-9.]+) ms\)$/\2\t\1/' \
+ | ${pkgs.coreutils}/bin/sort -n \
+ | ${pkgs.coreutils}/bin/cut -f2 \
+ | ${pkgs.coreutils}/bin/head -n 1
+ }
'';
in out
diff --git a/krebs/3modules/repo-sync.nix b/krebs/3modules/repo-sync.nix
index 91111f3eb..f9877c0f8 100644
--- a/krebs/3modules/repo-sync.nix
+++ b/krebs/3modules/repo-sync.nix
@@ -176,7 +176,7 @@ let
];
environment = {
- GIT_SSH_COMMAND = "${pkgs.openssh}/bin/ssh -i ${cfg.stateDir}/ssh.priv";
+ GIT_SSH_COMMAND = "${pkgs.openssh}/bin/ssh -i ${cfg.privateKeyFile.path}";
REPONAME = "${name}.git";
};