From 9287758fa6cdf4d59416ebce83d0a2d0eee61a3a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 3 Aug 2021 17:36:05 +0200 Subject: vidhar: static networking --- hosts/vidhar/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hosts') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 25f37133..67d7d442 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -65,7 +65,12 @@ useDHCP = false; useNetworkd = true; - interfaces."eno1".useDHCP = true; + defaultGateway = { address = "192.168.2.1"; }; + interfaces."eno1" = { + ipv4.addresses = [ + { address = "192.168.2.168"; prefixLength = 24; } + ]; + }; firewall = { enable = true; @@ -78,6 +83,11 @@ ]; }; }; + systemd.network.networks."40-eno1".networkConfig = { + Domains = lib.mkForce "~."; + DNS = [ "192.168.2.1" ]; + }; + services.timesyncd.enable = false; services.chrony = { enable = true; -- cgit v1.2.3