Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit9accdbf60c7afd6479e7e5fb5fb933928c1fb981 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-08-06 17:39:46 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-08-06 17:39:46 +0300
Files189386878cb13463a5738d8e0715dcee2d1606b7
nix-9accdbf60c7afd6479e7e5fb5fb933928c1fb981.tar
nix-9accdbf60c7afd6479e7e5fb5fb933928c1fb981.tar.gz
nix-9accdbf60c7afd6479e7e5fb5fb933928c1fb981.zip
Parentdabd3cbb20ad6d51dedc5372d9bd5428662dad86 (diff)
fix(machines/marduk): Fix slow SSH login
1 files changed, 19 insertions, 1 deletions
-rw-r--r--machines/marduk/configuration.nix20
diff --git a/machines/marduk/configuration.nix b/machines/marduk/configuration.nix
index ccae879..71fc1bf 100644
--- a/machines/marduk/configuration.nix
+++ b/machines/marduk/configuration.nix
@@ -13,7 +13,7 @@
};
};
- config = {
+ config = rec {
constants = {
# I've currently set this IP in my router configuration.
# It would be better to write a proper static IP NixOS config, but its
@@ -25,5 +25,23 @@
# work with it.
tld = "int";
};
+
+ # This improves SSH speed via server.int
+ # The main problem is that when SSH-ing with server.int, the domain is
+ # queried, however DNS resolution doesn't happen through dnsmasq but
+ # through the nss hosts, which causes ~20 seconds of delay.
+ # Now we're first checking /etc/hosts and then the databases listed.
+ networking.hosts = {
+ ${constants.ip} = [ "server.int" ];
+ };
+ system.nssDatabases.hosts = lib.mkForce [
+ "files"
+ "mymachines"
+ "mdns4_minimal"
+ "[NOTFOUND=return]"
+ "myhostname"
+ "dns"
+ "mdns4"
+ ];
};
}