ops/nixos: tidy up networking.useDHCP
This commit is contained in:
parent
f463055acf
commit
ad95bffd3d
13 changed files with 8 additions and 28 deletions
|
@ -102,7 +102,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "193.228.196.56";
|
address = "193.228.196.56";
|
||||||
interface = "enp1s0";
|
interface = "enp1s0";
|
||||||
|
@ -112,7 +111,6 @@ in {
|
||||||
interface = "enp1s0";
|
interface = "enp1s0";
|
||||||
};
|
};
|
||||||
interfaces.enp1s0 = {
|
interfaces.enp1s0 = {
|
||||||
useDHCP = false;
|
|
||||||
ipv4.addresses = [{ address = "193.228.196.57"; prefixLength = 31; }];
|
ipv4.addresses = [{ address = "193.228.196.57"; prefixLength = 31; }];
|
||||||
ipv6.addresses = [{ address = "2a0f:93c0:0:22::2"; prefixLength = 126; }];
|
ipv6.addresses = [{ address = "2a0f:93c0:0:22::2"; prefixLength = 126; }];
|
||||||
};
|
};
|
||||||
|
|
|
@ -96,7 +96,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "185.198.188.28";
|
address = "185.198.188.28";
|
||||||
interface = "br-ext";
|
interface = "br-ext";
|
||||||
|
|
|
@ -123,7 +123,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "83.97.19.65";
|
address = "83.97.19.65";
|
||||||
interface = "eno1";
|
interface = "eno1";
|
||||||
|
|
|
@ -50,7 +50,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "205.185.116.1";
|
address = "205.185.116.1";
|
||||||
interface = "ens3";
|
interface = "ens3";
|
||||||
|
|
|
@ -50,7 +50,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "107.189.4.1";
|
address = "107.189.4.1";
|
||||||
interface = "ens3";
|
interface = "ens3";
|
||||||
|
|
|
@ -53,7 +53,6 @@ in {
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
"8.8.4.4"
|
"8.8.4.4"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "199.195.254.1";
|
address = "199.195.254.1";
|
||||||
interface = "ens3";
|
interface = "ens3";
|
||||||
|
|
|
@ -77,11 +77,6 @@ in {
|
||||||
systemd.services.systemd-udev-settle.enable = false;
|
systemd.services.systemd-udev-settle.enable = false;
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
||||||
# replicates the default behaviour.
|
|
||||||
# Use NetworkManager instead.
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.dhcpcd.enable = false;
|
networking.dhcpcd.enable = false;
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,6 @@ in {
|
||||||
"blade.as205479.net"
|
"blade.as205479.net"
|
||||||
"storage.blade.as205479.net"
|
"storage.blade.as205479.net"
|
||||||
];
|
];
|
||||||
useDHCP = false;
|
|
||||||
bridges = let
|
bridges = let
|
||||||
br = interfaces: { interfaces = lib.mkDefault interfaces; rstp = false; };
|
br = interfaces: { interfaces = lib.mkDefault interfaces; rstp = false; };
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -55,7 +55,6 @@
|
||||||
"blade.as205479.net"
|
"blade.as205479.net"
|
||||||
];
|
];
|
||||||
|
|
||||||
useDHCP = false;
|
|
||||||
defaultGateway = lib.mkDefault {
|
defaultGateway = lib.mkDefault {
|
||||||
address = "10.100.0.1";
|
address = "10.100.0.1";
|
||||||
interface = "enp1s0";
|
interface = "enp1s0";
|
||||||
|
|
|
@ -125,6 +125,7 @@ in
|
||||||
switch-prebuilt
|
switch-prebuilt
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.useDHCP = false;
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowPing = true;
|
allowPing = true;
|
||||||
logRefusedConnections = false;
|
logRefusedConnections = false;
|
||||||
|
|
|
@ -110,12 +110,6 @@ in {
|
||||||
systemd.services.systemd-udev-settle.enable = false;
|
systemd.services.systemd-udev-settle.enable = false;
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
||||||
# replicates the default behaviour.
|
|
||||||
# Use NetworkManager instead.
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.eno1.useDHCP = false;
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
my.ip.tailscale = "100.125.26.108";
|
my.ip.tailscale = "100.125.26.108";
|
||||||
|
|
||||||
|
@ -151,11 +145,13 @@ in {
|
||||||
services.printing.drivers = with depot.pkgs; [ intermec-cups-driver ];
|
services.printing.drivers = with depot.pkgs; [ intermec-cups-driver ];
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver = {
|
||||||
services.xserver.layout = "us";
|
enable = true;
|
||||||
services.xserver.libinput.enable = true;
|
layout = "us";
|
||||||
services.xserver.windowManager.i3.enable = true;
|
libinput.enable = true;
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
windowManager.i3.enable = true;
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
};
|
||||||
specialisation.intelGraphics.configuration = {
|
specialisation.intelGraphics.configuration = {
|
||||||
my.specialisationName = "intelGraphics";
|
my.specialisationName = "intelGraphics";
|
||||||
services.xserver.videoDrivers = lib.mkForce [ "intel" ];
|
services.xserver.videoDrivers = lib.mkForce [ "intel" ];
|
||||||
|
|
|
@ -47,7 +47,6 @@ in {
|
||||||
hostName = "swann"; # Define your hostname.
|
hostName = "swann"; # Define your hostname.
|
||||||
domain = "int.as205479.net";
|
domain = "int.as205479.net";
|
||||||
nameservers = ["8.8.8.8" "8.8.4.4"];
|
nameservers = ["8.8.8.8" "8.8.4.4"];
|
||||||
useDHCP = false;
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
lo = {
|
lo = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
|
|
|
@ -86,13 +86,11 @@ in {
|
||||||
hostName = "totoro"; # Define your hostname.
|
hostName = "totoro"; # Define your hostname.
|
||||||
domain = "int.as205479.net";
|
domain = "int.as205479.net";
|
||||||
hostId = "676c08c4";
|
hostId = "676c08c4";
|
||||||
useDHCP = false;
|
|
||||||
interfaces.br-ext.useDHCP = true;
|
interfaces.br-ext.useDHCP = true;
|
||||||
bridges.br-ext.interfaces = [ "enp0s31f6" ];
|
bridges.br-ext.interfaces = [ "enp0s31f6" ];
|
||||||
|
|
||||||
interfaces.br-int = {
|
interfaces.br-int = {
|
||||||
virtual = true;
|
virtual = true;
|
||||||
useDHCP = false;
|
|
||||||
ipv4.addresses = [{ address = "10.0.0.2"; prefixLength = 24; }];
|
ipv4.addresses = [{ address = "10.0.0.2"; prefixLength = 24; }];
|
||||||
};
|
};
|
||||||
bridges.br-int.interfaces = [];
|
bridges.br-int.interfaces = [];
|
||||||
|
|
Loading…
Reference in a new issue