# This is device is meant to be a home, LOCAL ONLY server! # The configurations you will find are woefully insecure and hard-coded. { config, lib, ... }: { imports = [ ./httpd.nix ]; srv = { static = { ip = "192.168.0.10"; interface = "enp1s0"; }; # This is actually a fantastic TLD. Very few sites use it, you may # consider it as an abbreviation of "internal" and is one of the # "original" gTLDs, introduced in 1988, so every device will always # work with it. tld = "int"; slds = [ "uttu" ]; sldsImport = [ ../marduk/configuration.nix ]; }; # 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 = { ${config.srv.static.ip} = [ "${config.networking.hostName}.${config.srv.tld}" ]; }; system.nssDatabases.hosts = lib.mkForce [ "files" "mymachines" "mdns4_minimal" "[NOTFOUND=return]" "myhostname" "dns" ]; }