NixOS/system/modules/networking.nix

31 lines
708 B
Nix
Raw Permalink Normal View History

{ config, pkgs, ... }:
2024-06-12 09:54:11 +07:00
{
networking.networkmanager.enable = true;
networking.extraHosts = ''
192.168.50.217 gitlab.bareksa.com
'';
2024-06-12 20:25:30 +07:00
networking.firewall =
let
cfg = config.profile.networking.firewall;
in
{
enable = cfg.enable;
2024-06-12 20:25:30 +07:00
allowedTCPPorts = cfg.allowedTCPPorts;
allowedUDPPorts = [ 53 ];
2024-06-12 20:25:30 +07:00
};
services.resolved = {
enable = true;
};
environment.etc."systemd/resolved.conf.d/10-bareksa.conf".source =
(pkgs.formats.ini { }).generate "10-bareksa.conf"
{
Resolve = {
# This dns server is only available when VPN is connected.
DNS = "192.168.3.215";
Domains = "~bareksa.local";
};
};
2024-06-12 09:54:11 +07:00
}