define system config for dns resolver
This commit is contained in:
parent
f4ff592efd
commit
78a1b6daa7
4 changed files with 62 additions and 0 deletions
36
systems/resolv-dns.noc.eh22.intern/system.nix
Normal file
36
systems/resolv-dns.noc.eh22.intern/system.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
# configure static IP address
|
||||
networking.useDHCP = false;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks = {
|
||||
"10-mgmtNet" = {
|
||||
matchConfig.MACAddress = "BC:24:11:61:E3:D9";
|
||||
address = [ "10.20.25.5/24" ];
|
||||
gateway = [ "10.20.25.2" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# enable knot resolv server
|
||||
# ref: https://search.nüschtos.de/?query=services.kresd
|
||||
# https://www.knot-resolver.cz/documentation/stable/
|
||||
services.kresd = {
|
||||
enable = true;
|
||||
instances = 4;
|
||||
listenPlain = [ "53" ];
|
||||
extraConfig = builtins.readFile ./kresd-config.lua;
|
||||
};
|
||||
|
||||
# DO NOT CHANGE
|
||||
# this defines the first version of NixOS that was installed on the machine so that programs with non-migratable data files are kept compatible
|
||||
home-manager.users.noc.home.stateVersion = "24.11";
|
||||
system.stateVersion = "24.11";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue