-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservices.nix
51 lines (47 loc) · 1.32 KB
/
services.nix
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
39
40
41
42
43
44
45
46
47
48
49
50
51
{ config, pkgs, ... }:
{
# local dns
services.unbound = {
enable = true;
resolveLocalQueries = true;
enableRootTrustAnchor = true;
settings = {
server = {
interface = [ "127.0.0.1" ];
do-ip4 = "yes";
do-udp = "yes";
do-tcp = "yes";
do-ip6 = "no";
prefer-ip6 = "no";
use-caps-for-id = "no";
prefetch = "yes";
num-threads = 1;
so-rcvbuf = "1m";
private-address = [ "192.168.0.0/16" "169.254.0.0/16" "172.16.0.0/12" "10.0.0.0/8" ];
};
forward-zone = {
name = ".";
forward-addr = [ "9.9.9.9" "149.112.112.112" "1.1.1.1" "1.0.0.1"];
};
};
};
# Add virtualization support
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
# docker
virtualisation.docker.enable = true;
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
virtualisation.docker.daemon.settings = {
dns = [ "127.0.0.1" "9.9.9.9" ];
};
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
#networking.firewall.allowedTCPPorts = [ 25000 25001 25002 25003 25004 25005 ];
#networking.firewall.allowedUDPPorts = [ 1337 25000 25001 25002 25003 25003 25004 25005 ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
}