Skip to content

Commit

Permalink
systemd: move systemd-tmpfiles-setup-dev.service back to early boot
Browse files Browse the repository at this point in the history
It was originally moved because of nixops autoLuks feature which
has been unsupported for a while.

See:
* #62211
* NixOS/nixops#1156 (comment)

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).

(cherry picked from commit d4e4d27)
  • Loading branch information
arianvp authored and github-actions[bot] committed Dec 8, 2021
1 parent fb96af4 commit 043ddf1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 043ddf1

Please sign in to comment.