summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-07 15:58:49 +0100
committertv <tv@krebsco.de>2016-02-07 15:58:49 +0100
commit4c40eba8161d4afaa85984737c6f03adf861be7a (patch)
tree7ce4018d4c5e29a32079a51f2a4887efb72d7375 /krebs/3modules/default.nix
parentee5a1ddffe51117862f7e2669f3939dd165d5686 (diff)
krebs: add localhost to knownHosts
Diffstat (limited to 'krebs/3modules/default.nix')
-rw-r--r--krebs/3modules/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index e11d40a05..e4e5642ce 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -155,7 +155,16 @@ let
let inherit (config.krebs.build.host.ssh) privkey; in
mkIf (privkey != null) (mkForce [privkey]);
+ # TODO use imports for merging
services.openssh.knownHosts =
+ (let inherit (config.krebs.build.host.ssh) pubkey; in
+ optionalAttrs (pubkey != null) {
+ localhost = {
+ hostNames = ["localhost" "127.0.0.1" "::1"];
+ publicKey = pubkey;
+ };
+ })
+ //
# GitHub's IPv4 address range is 192.30.252.0/22
# Refs https://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist/
# 192.30.252.0/22 = 192.30.252.0-192.30.255.255 (1024 addresses)