file cleanup, conditional motd
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
}: let
|
||||
service = "dnsmasq";
|
||||
cfg = config.homelab.${service};
|
||||
sec = config.sops.secrets;
|
||||
homelab = config.homelab;
|
||||
in {
|
||||
options.homelab.${service} = {
|
||||
enable = lib.mkEnableOption "enables ${service}";
|
||||
@@ -16,6 +14,11 @@ in {
|
||||
default = 53;
|
||||
description = "set port for ${service} (default: ${toString cfg.port}";
|
||||
};
|
||||
upstream = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.10.0.1";
|
||||
description = "set upstream dns server for ${service} (default: $cfg.upstream}";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -25,7 +28,7 @@ in {
|
||||
alwaysKeepRunning = true;
|
||||
settings = {
|
||||
no-resolv = true;
|
||||
listen-address = "10.10.0.11"; # your LAN IP
|
||||
listen-address = config.homelab.host_ip; # your LAN IP
|
||||
#interface = "enp89s0";
|
||||
bind-interfaces = true;
|
||||
# address = [
|
||||
@@ -35,7 +38,7 @@ in {
|
||||
# ];
|
||||
server = [
|
||||
# upstream dns
|
||||
"10.10.0.1"
|
||||
cfg.upstream
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user