From 16da95bca0c6daecca412c7b883e4cf2aa6397ba Mon Sep 17 00:00:00 2001 From: Grigory Shipunov Date: Sat, 18 Jun 2022 06:07:26 +0200 Subject: [PATCH] cirrus: use networkd --- hosts/cirrus/configuration.nix | 18 ++++++++++++++++-- hosts/dishwasher/configuration.nix | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hosts/cirrus/configuration.nix b/hosts/cirrus/configuration.nix index 0f4182e..0054a64 100644 --- a/hosts/cirrus/configuration.nix +++ b/hosts/cirrus/configuration.nix @@ -16,8 +16,22 @@ boot.loader.grub.efiSupport = true; boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only -zramSwap = { enable = true; algorithm = "zstd"; }; - networking.hostName = "cirrus"; # Define your hostname. + zramSwap = { enable = true; algorithm = "zstd"; }; + + networking = { + hostName = "cirrus"; # Define your hostname. + }; + + systemd.network = { + enable = true; + networks."uplink" = { + matchConfig = { Name = "enp1s0"; }; + networkConfig = { + DHCP="yes"; + }; + }; + }; + # Set your time zone. time.timeZone = "Europe/Amsterdam"; diff --git a/hosts/dishwasher/configuration.nix b/hosts/dishwasher/configuration.nix index fd8b311..258c3a5 100644 --- a/hosts/dishwasher/configuration.nix +++ b/hosts/dishwasher/configuration.nix @@ -19,7 +19,7 @@ interfaces.enp1s0.useDHCP = true; hostName = "dishwasher"; # Define your hostname. useNetworkd = true; - firewall.enable = false; + firewall.enable = true; }; time.timeZone = "Europe/Amsterdam";