Update network config

This commit is contained in:
Alex 2021-11-02 17:33:54 +01:00
parent 4d16e39456
commit 17ae5ac6b6
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1
2 changed files with 35 additions and 11 deletions

View file

@ -35,6 +35,13 @@ in
networking.useDHCP = false; networking.useDHCP = false;
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Route internet traffic via USB modem (=phone) on other computer
networking.nameservers = [ "9.9.9.9" ];
networking.defaultGateway = {
address = "192.168.1.14";
interface = "eno1";
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
@ -78,8 +85,9 @@ in
users.users.lx = { users.users.lx = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"wheel" # Enable sudo for the user. "wheel" # Enable sudo for the user.
"video" # Having fun with links -g "video" # Having fun with links -g
"docker" # Enable management of Docker containers
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
# Keys for accessing nodes from outside # Keys for accessing nodes from outside
@ -101,6 +109,8 @@ in
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
tmux tmux
ncdu
iotop
wget wget
htop htop
links links
@ -160,11 +170,32 @@ in
enabled = true; enabled = true;
network_interface = "eno1"; network_interface = "eno1";
}; };
plugin = [
{
docker = [
{
config = [
{
volumes.enabled = true;
}
];
}
];
}
];
}; };
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 4646 4647 4648 8500 8300 8301 8302 ]; networking.firewall.allowedTCPPorts = [
networking.firewall.allowedUDPPorts = [ 4648 8301 8302 ]; 22 # SSH
3900 3901 # Garage (internal RPC traffic)
4646 4647 4648 # Nomad
8500 8300 8301 8302 # Consul
];
networking.firewall.allowedUDPPorts = [
4648 # Nomad
8301 8302 # Consul
];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;

View file

@ -13,13 +13,6 @@
} }
]; ];
# Route internet traffic via USB modem (=phone) on other computer
networking.nameservers = [ "9.9.9.9" ];
networking.defaultGateway = {
address = "192.168.1.14";
interface = "eno1";
};
# OR use USB modem plugged in here # OR use USB modem plugged in here
#networking.interfaces.enp0s20u1.useDHCP = true; #networking.interfaces.enp0s20u1.useDHCP = true;