blob: 8cf01601a8ea0c717c2823dd84bfd76ec8da4b26 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# 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"
];
}
|