mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-21 19:52:52 +00:00
add networking
This commit is contained in:
parent
495a6e127b
commit
f12927c0f9
3 changed files with 21 additions and 30 deletions
|
@ -28,23 +28,6 @@
|
|||
# "/crypto_keyfile.bin" = null;
|
||||
# };
|
||||
|
||||
networking.hostName = "bridge"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
unmanaged = ["virbr0" "docker0"];
|
||||
};
|
||||
|
||||
networking.nftables.enable = true;
|
||||
|
||||
networking.firewall.trustedInterfaces = ["incusbr0" "virbr0"];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
|
||||
|
@ -92,19 +75,6 @@
|
|||
};
|
||||
|
||||
# Change DNS
|
||||
networking = {
|
||||
extraHosts = ''
|
||||
185.199.108.133 raw.githubusercontent.com
|
||||
'';
|
||||
nameservers = ["1.1.1.1" "9.9.9.9"];
|
||||
bridges = {incusbr0.interfaces = [];};
|
||||
# firewall.extraCommands = ''
|
||||
# iptables -A INPUT incusbr0 -j ACCEPT
|
||||
# iptables -A FORWARD -o incusbr0 -j ACCEPT
|
||||
# iptables -A FORWARD -i incusbr0 -j ACCEPT
|
||||
# iptables -A OUTPUT -o incusbr0 -j ACCEPT
|
||||
# '';
|
||||
};
|
||||
|
||||
# Enable dde
|
||||
# services.xserver.desktopManager.deepin.enable = true;
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
./filesystem
|
||||
./hardware
|
||||
./kernel
|
||||
./networking
|
||||
];
|
||||
}
|
||||
|
|
20
modules/nixos/networking/default.nix
Normal file
20
modules/nixos/networking/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
_: {
|
||||
networking = {
|
||||
hostname = "bridge";
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
unmanaged = ["virbr0" "docker0"];
|
||||
};
|
||||
|
||||
nftables.enable = true;
|
||||
|
||||
firewall.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