config/modules/networking-client/default.nix

48 lines
1 KiB
Nix
Raw Normal View History

{ config, inputs, pkgs, ... }:
2022-02-05 21:42:36 +02:00
{
networking.useDHCP = false;
networking.networkmanager = {
dns = "systemd-resolved";
enableStrongSwan = false;
extraConfig = ''
[connectivity]
uri=http://whoami.privatevoid.net/online
response=CONNECTED_GLOBAL
interval=120
'';
};
2022-02-05 21:42:36 +02:00
services.resolved = {
enable = true;
fallbackDns = [
"95.216.8.12#securedns.privatevoid.net"
"152.67.73.164#securedns.privatevoid.net"
"10.1.0.1"
];
2022-02-05 21:42:36 +02:00
llmnr = "true";
dnssec = "false";
extraConfig = ''
Cache=no-negative
DNSOverTLS=opportunistic
DNS=${builtins.concatStringsSep " " config.services.resolved.fallbackDns}
'';
2022-02-05 21:42:36 +02:00
};
networking.firewall = let
ports = [
5355 # llmnr
];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
boot.extraModulePackages = [
(inputs.self.packages.${pkgs.system}.evil.override {
inherit (config.boot.kernelPackages) kernel;
})
];
boot.kernelModules = [ "evil" ];
2022-02-05 21:42:36 +02:00
}