mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
nixos/udev: enable initrd-udevadm-cleanup-db.service in systemd stage 1
This commit is contained in:
parent
c6e5939c8f
commit
51e4bd298f
|
@ -46,6 +46,11 @@ let
|
|||
SUBSYSTEM=="input", KERNEL=="mice", TAG+="systemd"
|
||||
'';
|
||||
|
||||
nixosInitrdRules = ''
|
||||
# Mark dm devices as db_persist so that they are kept active after switching root
|
||||
SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS+="db_persist"
|
||||
'';
|
||||
|
||||
# Perform substitutions in all udev rules files.
|
||||
udevRulesFor = { name, udevPackages, udevPath, udev, systemd, binPackages, initrdBin ? null }: pkgs.runCommand name
|
||||
{ preferLocalBuild = true;
|
||||
|
@ -364,8 +369,10 @@ in
|
|||
EOF
|
||||
'';
|
||||
|
||||
boot.initrd.services.udev.rules = nixosInitrdRules;
|
||||
|
||||
boot.initrd.systemd.additionalUpstreamUnits = [
|
||||
# TODO: "initrd-udevadm-cleanup-db.service" is commented out because of https://github.com/systemd/systemd/issues/12953
|
||||
"initrd-udevadm-cleanup-db.service"
|
||||
"systemd-udevd-control.socket"
|
||||
"systemd-udevd-kernel.socket"
|
||||
"systemd-udevd.service"
|
||||
|
|
Loading…
Reference in a new issue