diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index 8881e23..10d8020 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -1,20 +1,15 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: - { nix.settings.experimental-features = [ "nix-command" "flakes" ]; imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./modules/networks ../../shared/vim.nix # ../../shared/sops.nix ]; - # Use the systemd-boot EFI boot loader. boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; @@ -24,8 +19,6 @@ services.zfs.autoScrub.enable = true; services.zfs.autoSnapshot.enable = true; - networking.hostName = "nuc"; # Define your hostname. - networking.hostId = "795a4952"; time.timeZone = "Europe/Berlin"; @@ -48,7 +41,6 @@ user.email = "rouven@rfive.de"; }; }; - # List services that you want to enable: # Enable the OpenSSH daemon. services.openssh.enable = true; diff --git a/hosts/nuc/modules/networks/default.nix b/hosts/nuc/modules/networks/default.nix new file mode 100644 index 0000000..86359f2 --- /dev/null +++ b/hosts/nuc/modules/networks/default.nix @@ -0,0 +1,21 @@ +{ config, ... }: +{ + networking = { + hostName = "nuc"; # Define your hostname. + hostId = "795a4952"; + useNetworkd = true; + }; + systemd.network = { + enable = true; + networks."10-loopback" = { + matchConfig.Name = "lo"; + linkConfig.RequiredForOnline = false; + }; + networks."10-wired" = { + matchConfig.Name = "eno1"; + networkConfig = { + DHCP = "yes"; + }; + }; + }; +} diff --git a/hosts/thinkpad/modules/networks/default.nix b/hosts/thinkpad/modules/networks/default.nix index d5c032e..46b31d8 100644 --- a/hosts/thinkpad/modules/networks/default.nix +++ b/hosts/thinkpad/modules/networks/default.nix @@ -37,6 +37,7 @@ wait-online.anyInterface = true; networks."10-loopback" = { matchConfig.Name = "lo"; + linkConfig.RequiredForOnline = false; }; networks."10-wired" = { matchConfig.Name = "enp0s31f6";