feat: first nameserver set up

This commit is contained in:
silver 2023-01-18 02:06:08 +00:00
parent f3a3768f92
commit 8db9529449
4 changed files with 34 additions and 9 deletions

View file

@ -39,8 +39,8 @@ in {
forwarders = [
# these were in old config file
"193.1.100.130"
"193.1.100.131"
#"193.1.100.130"
#"193.1.100.131"
];
zones = {
@ -62,10 +62,11 @@ in {
extraConfig = "";
# really wish teh nixos config didnt use master/slave
master = true;
masters = [ ];
slaves = [ ];
file = ''
# need to write this to a file
file = pkgs.writeText "dns_zone_skynet"
# no leading whitespace for first line
''
$TTL 60 ; 1 minute
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
@ IN SOA ns1.skynet.ie. hostmaster.skynet.ie. (

View file

@ -78,7 +78,11 @@
*/
#test02 = import ./machines/test02.nix;
# firewall machiene
agentjones = import ./machines/agentjones.nix;
# ns1
vendetta = import ./machines/vendetta.nix;
};
};

View file

@ -19,6 +19,7 @@ in {
imports = [
# applications for this particular server
../applications/firewall.nix
../applications/dns.nix
];
deployment = {
@ -27,6 +28,13 @@ in {
targetUser = "root";
};
skynet_dns.records = {
external = [
"agentjones A ${ip_pub}"
];
cname = [];
};
# this has to be defined for any physical servers
# vms are defined by teh vm host
networking.interfaces = {

View file

@ -16,12 +16,17 @@ let
ip_pub = "192.168.1.157";
ip_priv = "172.20.20.3";
# hostname = "vendetta.skynet.ie";
hostname = "test01.home.brendan.ie";
hostname = "192.168.1.157";
# this server will have to have dns records
own = {
external = [
"vendetta A ${ip_pub}"
"ns1 A ${ip_pub}"
# needs this, temporally
"ns2 A ${ip_pub}"
"mail A ${ip_pub}"
];
cname = [
#"misc CNAME vendetta"
@ -39,6 +44,13 @@ in {
targetUser = "root";
};
networking = {
firewall = {
allowedTCPPorts = [22 53];
allowedUDPPorts = [53];
};
};
skynet_dns = {
enable = true;