fix: several typo & errors on the dns config
This commit is contained in:
@@ -4,7 +4,7 @@ in
|
||||
{
|
||||
out = ''
|
||||
logging {
|
||||
level = "warning"
|
||||
level = "warn"
|
||||
}
|
||||
loki.write "grafana_loki" {
|
||||
endpoint {
|
||||
|
||||
@@ -15,8 +15,11 @@ in
|
||||
# OPTIONAL string swap: swap space (default null)
|
||||
swap = null;
|
||||
|
||||
# OPTIONAL list of int ports: ports to open (TCP tho) (default [])
|
||||
ports = [ 80 ];
|
||||
# OPTIONAL list of int tcp_ports: TCP ports to open (default [])
|
||||
tcp_ports = [ 80 ];
|
||||
|
||||
# OPTIONAL list of int udp_ports: UDP ports to open (default [])
|
||||
udp_ports = [ ];
|
||||
|
||||
# OPTIONAL submodule services: services to be passed to the NixOS Module (default {})
|
||||
services = {
|
||||
|
||||
@@ -9,7 +9,8 @@ let
|
||||
disk = def.disk or "4G";
|
||||
swap = def.swap or 512;
|
||||
services = def.services or { };
|
||||
open_ports = def.open_ports or [ ];
|
||||
tcp_ports = def.tcp_ports or [ ];
|
||||
udp_ports = def.udp_ports or [ ];
|
||||
other_packages = def.other_packages or [ ];
|
||||
etc = def.etc or { };
|
||||
logging_enabled = def.logging.enable or false; # TODO: Implement
|
||||
@@ -54,7 +55,11 @@ in
|
||||
]
|
||||
++ extraModules;
|
||||
networking.hostName = hostname;
|
||||
networking.firewall.allowedTCPPorts = open_ports;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = tcp_ports;
|
||||
allowedUDPPorts = udp_ports;
|
||||
};
|
||||
services =
|
||||
services
|
||||
// lib.optionalAttrs (logging_enabled) {
|
||||
|
||||
Reference in New Issue
Block a user