4e925f8a89
also added the configuration bc idk how to add only certain files but whatever
39 lines
657 B
Nix
39 lines
657 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.homelab.networking.core;
|
|
in
|
|
{
|
|
imports = [
|
|
./firewall.nix
|
|
];
|
|
|
|
config = {
|
|
networking = {
|
|
networkmanager = {
|
|
enable = true;
|
|
dns = "systemd-resolved";
|
|
};
|
|
|
|
extraHosts = lib.concatMapStringsSep "\n" (
|
|
host: "${host.ip_address} ${host.hostname}"
|
|
) cfg.extraHosts;
|
|
|
|
nftables.enable = true;
|
|
|
|
nameservers = cfg.nameservers;
|
|
};
|
|
|
|
services.resolved = {
|
|
enable = true;
|
|
|
|
settings.Resolve = {
|
|
dnssec = "true";
|
|
DNSOverTLS = "true";
|
|
domains = [ "~." ];
|
|
fallbackDns = cfg.nameservers;
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|