mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
89d7a9bd made systemd-tmpfiles-setup RequiresMountsFor the five nofail
USB-disk mounts. One failed mount then skipped every tmpfiles rule on the
host, and sysinit.target waited for the disks and the LUKS unlock even on
success.
Leave the boot-wide pass as upstream ships it and add data-tmpfiles:
`systemd-tmpfiles --prefix=/data` with WantsMountsFor on the /data mounts,
ordered before the services that use them.
Assisted-by: Claude Code (claude-opus-5-5)
15 lines
376 B
Nix
15 lines
376 B
Nix
{
|
|
outputs,
|
|
...
|
|
}:
|
|
let
|
|
services = outputs.nixosConfigurations.youko.config.systemd.services;
|
|
unit = services.data-tmpfiles;
|
|
in
|
|
{
|
|
wantsMountsFor = builtins.sort builtins.lessThan unit.unitConfig.WantsMountsFor;
|
|
execStart = unit.serviceConfig.ExecStart;
|
|
setupWaitsForData =
|
|
(services.systemd-tmpfiles-setup or { }).unitConfig.RequiresMountsFor or [ ] != [ ];
|
|
}
|