Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.73 KB

TODO.md

File metadata and controls

33 lines (26 loc) · 1.73 KB
  • migration from impermanence works fine, but needs some specific documentation

  • add support for tmpfiles' modifiers?

  • custom systemd-tmpfiles service in stage-2?

    Currently the two upstream services are used, one in initrd to prepare files before switch-root, and the second one in stage-2 after switch-root.

    Right now there is no way to provision files with the same systemd-tmpfiles configuration inside a directory structure that is also persisted by Preservation, unless the preservation happens in stage-1 and the rest in stage-2. This is because Preservation uses systemd-tmpfiles to create files and directories before creating the corresponding bindmounts between them.

    Another issue occurs with the systemd-journald-flush.service, which is ordered to run before tmpfiles-setup, while having a dependency on var-log.mount. Should /var/log be persisted with Preservation, the var-log.mount unit will be generated by Preservation as a bindmount from the volatile to the persistent volume and because the underlying directories need to exist before the mount is created, var-log.mount will be ordered after systemd-tmpfiles-setup, thus causing a dependency loop.

    At this moment a simple solution to this problem is to configure the preservation of /var/log with inInitrd = true so that everything is already set up in stage-1, which avoids the dependency loop in stage-2 altogether.

    One alternative to this would be to create a custom systemd-tmpfiles service specifically for Preservation, that is ordered before the default systemd-tmpfiles-setup.service. To make this feasible, it would be nice to have access to the upstream NixOS option definitions for systemd.tmpfiles.settings via the systemd-lib.