From 764c8203b833176d546395a5c1adf193a9ca73f8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 28 Apr 2020 18:56:01 -0500 Subject: [PATCH] =?UTF-8?q?nixos/systemd.nix:=20don=E2=80=99t=20require=20?= =?UTF-8?q?online=20for=20multi-user.target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not all systems need to be online to boot up. So, don’t pull network-online.target into multi-user.target. Services that need online network can still require it. This increases my boot time from ~9s to ~5s. --- nixos/modules/system/boot/systemd.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 2167df60bc9..58e2f9d3bfc 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -1033,7 +1033,6 @@ in systemd.services.systemd-journald.stopIfChanged = false; systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true; systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true; - systemd.targets.network-online.wantedBy = [ "multi-user.target" ]; systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.mount" ]; # Don't bother with certain units in containers.