From 8a4536fdafd9bbd7005b007d5d0dc6e9ea1b3592 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 4 Jul 2025 05:21:36 +0200 Subject: [PATCH] networking: stop configuring NIS domain name The `domainname` utility uses setdomainname (see getdomainname(2)) to configure the NIS[1] (also known as YP) domain name. It provided a central directory for various objects that are resolved via nsswitch in the late 1990s and early 2000s. It is however not a safe nor common deployment scenario anymore. [1] https://en.wikipedia.org/wiki/Network_Information_Service --- nixos/modules/tasks/network-interfaces.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 76f1262506d5..00c0b4049fd0 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -1617,18 +1617,6 @@ in ) ); - systemd.services.domainname = lib.mkIf (cfg.domain != null) { - wantedBy = [ "sysinit.target" ]; - before = [ - "sysinit.target" - "shutdown.target" - ]; - conflicts = [ "shutdown.target" ]; - unitConfig.DefaultDependencies = false; - serviceConfig.ExecStart = ''${pkgs.nettools}/bin/domainname "${cfg.domain}"''; - serviceConfig.Type = "oneshot"; - }; - environment.etc.hostid = mkIf (cfg.hostId != null) { source = hostidFile; }; boot.initrd.systemd.contents."/etc/hostid" = mkIf (cfg.hostId != null) { source = hostidFile; };