diff --git a/systems/palatine-hill/configuration.nix b/systems/palatine-hill/configuration.nix index e4c04a2..cd6ef5d 100644 --- a/systems/palatine-hill/configuration.nix +++ b/systems/palatine-hill/configuration.nix @@ -23,14 +23,11 @@ let ]; in { + imports = [ ./networking.nix ]; systemd.services.hydra-notify.serviceConfig.EnvironmentFile = config.sops.secrets."hydra/environment".path; programs.git.lfs.enable = false; - networking = { - hostId = "dc2f9781"; - firewall.enable = false; - }; nixpkgs.config.packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; diff --git a/systems/palatine-hill/networking.nix b/systems/palatine-hill/networking.nix new file mode 100644 index 0000000..bb52d34 --- /dev/null +++ b/systems/palatine-hill/networking.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + networking = { + hostId = "dc2f9781"; + firewall.enable = false; + }; + + systemd.network = { + enable = true; + networks = { + # enable DHCP for primary ethernet adapter + "10-lan" = { + matchConfig.Name = "eno1"; + networkConfig.DHCP = "ipv4"; + address = [ "192.168.76.2/32" ]; + routes = [ { routeConfig.Gateway = "192.168.76.1"; } ]; + linkConfig.RequiredForOnline = "routable"; + }; + # default lan settings + "60-def-lan" = { + matchConfig.Name = "eno*"; + networkConfig.DHCP = "ipv4"; + routes = [ { routeConfig.Gateway = "192.168.76.1"; } ]; + linkConfig.RequiredForOnline = "no"; + }; + }; + }; +}