mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-14 00:59:44 +00:00
32 lines
638 B
Nix
32 lines
638 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: {
|
|
options = {
|
|
networking.enable = lib.mkEnableOption "enable networking";
|
|
};
|
|
config = lib.mkIf config.networking.enable {
|
|
networking = {
|
|
hostname = "bridge";
|
|
|
|
networkmanager = {
|
|
enable = true;
|
|
unmanaged = ["virbr0" "docker0"];
|
|
};
|
|
|
|
nftables.enable = true;
|
|
|
|
firewall = {
|
|
allowedTCPPorts = [80 443];
|
|
trustedInterfaces = ["incusbr0" "virbr0"];
|
|
};
|
|
|
|
extraHosts = ''
|
|
185.199.108.133 raw.githubusercontent.com
|
|
'';
|
|
nameservers = ["1.1.1.1" "9.9.9.9"];
|
|
bridges = {incusbr0.interfaces = [];};
|
|
};
|
|
};
|
|
}
|