2024-04-11 05:41:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
options = {
|
|
|
|
networking.enable = lib.mkEnableOption "enable networking";
|
|
|
|
};
|
|
|
|
config = lib.mkIf config.networking.enable {
|
|
|
|
networking = {
|
|
|
|
hostname = "bridge";
|
2024-04-10 17:42:17 +00:00
|
|
|
|
2024-04-11 05:41:14 +00:00
|
|
|
networkmanager = {
|
|
|
|
enable = true;
|
|
|
|
unmanaged = ["virbr0" "docker0"];
|
|
|
|
};
|
2024-04-10 17:42:17 +00:00
|
|
|
|
2024-04-11 05:41:14 +00:00
|
|
|
nftables.enable = true;
|
2024-04-10 17:42:17 +00:00
|
|
|
|
2024-04-11 05:41:14 +00:00
|
|
|
firewall = {
|
|
|
|
allowedTCPPorts = [80 443];
|
|
|
|
trustedInterfaces = ["incusbr0" "virbr0"];
|
|
|
|
};
|
2024-04-10 17:42:17 +00:00
|
|
|
|
2024-04-11 05:41:14 +00:00
|
|
|
extraHosts = ''
|
|
|
|
185.199.108.133 raw.githubusercontent.com
|
|
|
|
'';
|
|
|
|
nameservers = ["1.1.1.1" "9.9.9.9"];
|
|
|
|
bridges = {incusbr0.interfaces = [];};
|
|
|
|
};
|
2024-04-10 17:42:17 +00:00
|
|
|
};
|
|
|
|
}
|