From 41ff57c6d6a7ed4d8562169c0d3fd9d6adb949e6 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 17 Apr 2016 10:25:59 +0200 Subject: krebs.backup: use globally configured ssh ports --- krebs/5pkgs/default.nix | 4 ---- krebs/5pkgs/get-ssh-port/default.nix | 29 ----------------------------- 2 files changed, 33 deletions(-) delete mode 100644 krebs/5pkgs/get-ssh-port/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 5ec0d54e9..bcc894b2c 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -20,10 +20,6 @@ with config.krebs.lib; (filterAttrs (_: dir.has-default-nix) (subdirsOf ./.)) // { - get-ssh-port = callPackage ./get-ssh-port { - inherit config; - }; - haskellPackages = pkgs.haskellPackages.override { overrides = self: super: mapAttrs (name: path: self.callPackage path {}) diff --git a/krebs/5pkgs/get-ssh-port/default.nix b/krebs/5pkgs/get-ssh-port/default.nix deleted file mode 100644 index 2d106b2b6..000000000 --- a/krebs/5pkgs/get-ssh-port/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, pkgs, ... }: with config.krebs.lib; - -pkgs.writeScriptBin "get-ssh-port" '' - #! ${pkgs.dash}/bin/dash - set -efu - if test $# != 1 || test $1 = -h || test $1 = --help; then - echo "usage: get-ssh-port HOSTNAME" >&2 - exit 23 - fi - case $1 in - ${concatMapStringsSep ";;\n" - (host: toString [ - "(${shell.escape host.name})" - "echo ${toString host.nets.${config.krebs.search-domain}.ssh.port}" - ]) - (filter (host: hasAttr config.krebs.search-domain host.nets) - (attrValues config.krebs.hosts)) - };; - ${concatMapStringsSep ";;\n" - (net: toString [ - "(${concatMapStringsSep "|" shell.escape net.aliases})" - "echo ${toString net.ssh.port}" - ]) - (concatMap (host: attrValues host.nets) (attrValues config.krebs.hosts)) - };; - (*) echo "get-ssh-port: don't know ssh port of $1" >&2 - exit 1 - esac -'' -- cgit v1.2.3