krebs: add localhost to knownHosts

This commit is contained in:
tv 2016-02-07 15:58:49 +01:00
parent ee5a1ddffe
commit 4c40eba816

View File

@ -155,7 +155,16 @@ let
let inherit (config.krebs.build.host.ssh) privkey; in let inherit (config.krebs.build.host.ssh) privkey; in
mkIf (privkey != null) (mkForce [privkey]); mkIf (privkey != null) (mkForce [privkey]);
# TODO use imports for merging
services.openssh.knownHosts = 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 # 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/ # 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) # 192.30.252.0/22 = 192.30.252.0-192.30.255.255 (1024 addresses)