1
0
Fork 0
forked from DGNum/lab-infra

feat(dns01): init zone config

This commit is contained in:
Constantin Gierczak--Galle 2024-11-22 15:13:50 +01:00
parent 1568689e73
commit c428e0288a
No known key found for this signature in database
7 changed files with 67 additions and 11 deletions

View file

@ -7,10 +7,15 @@ lib.extra.mkConfig {
enabledServices = [
# List of services to enable
"dns"
"nsd"
];
extraConfig = { };
extraConfig = {
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMBW7rTtfZL9wtrpCVgariKdpN60/VeAzXkh9w3MwbO julien@enigma"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrijwPlb7KQkYPLznMPVzPPT69cLzhEsJzZi9tmxzTh cst1@x270"
];
};
root = ./.;
}

View file

@ -0,0 +1,22 @@
{ dns, ... }:
with dns.lib.combinators;
{
SOA = {
nameServer = "ns1";
adminEmail = "webmaster@dgnum.eu";
serial = 2019030800;
};
NS = [
# TODO: add nameservers with GLUE and everything
];
#A = [ "203.0.113.1" ];
#AAAA = [ "4321:0:1:2:3:4:567:89ab" ];
subdomains = {
photoprism = host "129.199.146.101" "";
immich = host "129.199.146.101" "";
};
}

View file

@ -1,8 +0,0 @@
{
networking = {
firewall = {
allowedUDPPorts = [ 53 ];
};
};
}

21
machines/dns01/nsd.nix Normal file
View file

@ -0,0 +1,21 @@
{ dns, ... }:
{
services.nsd = {
enable = true;
zones = {
"beta.dgnum.eu" = {
# provideXFR = [ ... ];
# notify = [ ... ];
data = dns.lib.toString "beta.dgnum.eu" (import ./beta.dgnum.eu.nix { inherit dns; });
};
};
};
networking = {
firewall = {
allowedUDPPorts = [
53
];
};
};
}

View file

@ -1,3 +1,3 @@
(import ../../../keys).mkSecrets [ "router02" ] [
(import ../../../keys).mkSecrets [ "dns01" ] [
# List of secrets for router02
]

View file

@ -1,4 +1,11 @@
{
dns01 = {
interfaces = { };
addresses.ipv4 = [ "129.199.146.102" ];
hostId = "1758233d";
};
krz01 = {
interfaces = {
vmbr0 = {

View file

@ -19,6 +19,15 @@
- luj01 -> VM de Luj
*/
{
dns01 = {
site = "pav01";
# TODO:
hashedPassword = "$y$j9T$eNZQgDN.J5y7KTG2hXgat1$J1i5tjx5dnSZu.C9B7swXi5zMFIkUnmRrnmyLHFAt8/";
stateVersion = "24.05";
nixpkgs = "24.05";
};
krz01 = {
site = "pav01";