mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-17 01:55:10 +01:00
init new infra
This commit is contained in:
parent
83458998aa
commit
0825d85c93
6 changed files with 206 additions and 0 deletions
28
newinfra/nix/modules/dns/default.nix
Normal file
28
newinfra/nix/modules/dns/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, ... }: {
|
||||
# get the package for the debugging tools
|
||||
environment.systemPackages = with pkgs; [ knot-dns ];
|
||||
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{ from = 53; to = 53; }
|
||||
];
|
||||
|
||||
services.knot = {
|
||||
enable = true;
|
||||
settingsFile = pkgs.writeTextFile {
|
||||
name = "knot.conf";
|
||||
text = ''
|
||||
server:
|
||||
listen: 0.0.0.0@53
|
||||
listen: ::@53
|
||||
|
||||
zone:
|
||||
- domain: noratrieb.dev
|
||||
storage: /var/lib/knot/zones/
|
||||
file: ${import ./noratrieb.dev.nix { inherit pkgs; }}
|
||||
log:
|
||||
- target: syslog
|
||||
any: info
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue