From d4e4d27dff47a5acab91e7c31cb74c8893926257 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Wed, 28 Apr 2021 19:37:07 +0200 Subject: [PATCH] systemd: move systemd-tmpfiles-setup-dev.service back to early boot It was originally moved because of nixops autoLuks feature which has been unsupported for a while. See: * https://github.com/NixOS/nixpkgs/issues/62211 * https://github.com/NixOS/nixops/pull/1156#issuecomment-605339705 systemd-tmpfiles-setup-dev.service needs to run very early (even before udev runs) because udev rules assume static device nodes already exist even before udev is started. If these static device nodes do not exist; systemd might have trouble mounting filesystems that require static device nodes (like loopfs and btrfs). --- pkgs/os-specific/linux/systemd/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index f0a3c6e65fec..425665894be1 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -575,12 +575,6 @@ stdenv.mkDerivation { ''; postInstall = '' - # sysinit.target: Don't depend on - # systemd-tmpfiles-setup.service. This interferes with NixOps's - # send-keys feature (since sshd.service depends indirectly on - # sysinit.target). - mv $out/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service $out/lib/systemd/system/multi-user.target.wants/ - mkdir -p $out/example/systemd mv $out/lib/{modules-load.d,binfmt.d,sysctl.d,tmpfiles.d} $out/example mv $out/lib/systemd/{system,user} $out/example/systemd