mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/etc: wantedBy -> requiredBy for mounting overlay etc
I've observed that sometimes the overlay mount unit does not get started when using wantedBy. requiredBy makes this relationship stricter and if necessary will restart the initrd-fs.target and thus ensure that when this target is reached /etc has alredy been mounted. This is in line with the description of initrd-fs.target in systemd.special: > Thus, once this target is reached the /sysroot/ hierarchy is fully set up
This commit is contained in:
parent
e7f2456df4
commit
d820fe987e
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@
|
|||
] ++ lib.optionals (!config.system.etc.overlay.mutable) [
|
||||
"ro"
|
||||
]);
|
||||
wantedBy = [ "initrd-fs.target" ];
|
||||
requiredBy = [ "initrd-fs.target" ];
|
||||
before = [ "initrd-fs.target" ];
|
||||
requires = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ];
|
||||
after = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue