add ad blocking dns server
Some checks failed
use nix / build (push) Failing after 4m0s

This commit is contained in:
Cyryl Płotnicki 2024-12-01 15:59:42 +00:00
parent 910b78c5ec
commit 205c2b9a11
4 changed files with 21 additions and 32 deletions

View file

@ -0,0 +1,18 @@
{
config,
pkgs,
inputs,
system,
...
}: {
services.resolved = {
# Disable local DNS stub listener on 127.0.0.53
extraConfig = ''
DNSStubListener=no
'';
};
services.technitium-dns-server = {
enable = true;
openFirewall = true;
};
}

View file

@ -6,6 +6,7 @@
imports = [ imports = [
../cli.nix ../cli.nix
../send-logs.nix ../send-logs.nix
./adblocking.nix
./bolty-boot.nix ./bolty-boot.nix
./grafana.nix ./grafana.nix
./home-assistant.nix ./home-assistant.nix
@ -18,9 +19,9 @@
./print-server.nix ./print-server.nix
./real-hardware.nix ./real-hardware.nix
./restic-server.nix ./restic-server.nix
./syncthing.nix
./tailscale-cert.nix ./tailscale-cert.nix
./virtualisation.nix ./virtualisation.nix
./syncthing.nix
../../git ../../git
../../helix ../../helix
../../mercurial ../../mercurial

View file

@ -15,36 +15,6 @@
enable = true; enable = true;
allowPing = true; allowPing = true;
}; };
services.samba = {
enable = true;
nsswins = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = smbnix
netbios name = smbnix
security = user
#use sendfile = yes
#max protocol = smb2
# note: localhost is the ipv6 localhost ::1
hosts allow = 10.0.0. 100. 127.0.0.1 localhost
hosts deny = 0.0.0.0/0
guest account = sambaguest
map to guest = bad user
'';
shares = {
videos = {
path = "/data/shares/videos";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "sambaguest";
};
};
openFirewall = true;
};
networking.firewall.allowedTCPPorts = [2049]; networking.firewall.allowedTCPPorts = [2049];
services.nfs.server = { services.nfs.server = {
enable = true; enable = true;

View file

@ -19,7 +19,7 @@
address = ["10.0.0.8/24"]; address = ["10.0.0.8/24"];
gateway = ["10.0.0.1"]; gateway = ["10.0.0.1"];
DHCP = "no"; DHCP = "no";
dns = ["100.100.100.100" "9.9.9.9"]; dns = ["10.0.0.8"];
}; };
networks."eth" = { networks."eth" = {
name = "enp4s0"; name = "enp4s0";