mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-06 04:16:19 +01:00
fix(youko): apply /data tmpfiles in a pass of their own
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)
This commit is contained in:
1 parent
905c3c6e1f
commit
dd2bd44bc2
4 files changed
+43
-17
No files matched your search
@@ -1,10 +1,15 @@
|
||||
{ ... }:
|
||||
{ outputs, ... }:
|
||||
let
|
||||
systemd = outputs.nixosConfigurations.youko.config.systemd.package;
|
||||
in
|
||||
{
|
||||
requiresMountsFor = [
|
||||
wantsMountsFor = [
|
||||
"/data/apps"
|
||||
"/data/apps-snapshots"
|
||||
"/data/backups"
|
||||
"/data/fileshare"
|
||||
"/data/fileshare/public"
|
||||
];
|
||||
execStart = "${systemd}/bin/systemd-tmpfiles --create --remove --boot --prefix=/data";
|
||||
setupWaitsForData = false;
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
unit = outputs.nixosConfigurations.youko.config.systemd.services.systemd-tmpfiles-setup;
|
||||
services = outputs.nixosConfigurations.youko.config.systemd.services;
|
||||
unit = services.data-tmpfiles;
|
||||
in
|
||||
{
|
||||
requiresMountsFor = builtins.sort builtins.lessThan unit.unitConfig.RequiresMountsFor;
|
||||
wantsMountsFor = builtins.sort builtins.lessThan unit.unitConfig.WantsMountsFor;
|
||||
execStart = unit.serviceConfig.ExecStart;
|
||||
setupWaitsForData =
|
||||
(services.systemd-tmpfiles-setup or { }).unitConfig.RequiresMountsFor or [ ] != [ ];
|
||||
}
|
||||
Reference in new issue
Block a user