mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-21 19:52:52 +00:00
add networking option
This commit is contained in:
parent
0e6f928345
commit
1d63a46291
1 changed files with 28 additions and 19 deletions
|
@ -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 = [];};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue