add networking option

This commit is contained in:
Aditya 2024-04-11 11:11:14 +05:30
parent 0e6f928345
commit 1d63a46291
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU

View file

@ -1,23 +1,32 @@
_: { {
networking = { config,
hostname = "bridge"; lib,
...
}: {
options = {
networking.enable = lib.mkEnableOption "enable networking";
};
config = lib.mkIf config.networking.enable {
networking = {
hostname = "bridge";
networkmanager = { networkmanager = {
enable = true; enable = true;
unmanaged = ["virbr0" "docker0"]; 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 = [];};
}; };
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 = [];};
}; };
} }