impermanence icon indicating copy to clipboard operation
impermanence copied to clipboard

nixos: Create persisted dirs marked as needed for boot before mount

Open talyz opened this issue 1 year ago • 8 comments

Create directories which are persisted, but also happen to be marked as needed for boot, at early boot. This happens for a few paths which NixOS always marks as such if there's a fileSystems-entry for them, for example /var/lib/nixos.

Fixes #121.

talyz avatar Feb 24 '24 13:02 talyz

Hey interested on this due I trying to use nixos-anywhere + impermanence, can you provide an example of how to configure a flake with this persisted paths so I can test, thanks!

segator avatar Apr 06 '24 10:04 segator

Hi! You can use the flake ref github:nix-community/impermanence/create-needed-for-boot to try this out.

talyz avatar Apr 07 '24 07:04 talyz

is just to enable this in flake? I tought reading your change we needed to enable something else. nevertheless if this is the case it does not work I made it work by creating the folders mkdir in disko device post hook

segator avatar Apr 08 '24 15:04 segator

Yes, it should just work automatically with no extra config. I don't know how it would interact with nixos-anywhere or disko, though. Do you have a config / flake you can share? I need some more context to investigate why it doesn't work for you.

talyz avatar Apr 15 '24 06:04 talyz

Hey sorry I completely out of time this weeks, as soon as I have I will prepare a simple flake you can fully test in a VM with nixos-anywhere. but defintelly does not work :(

segator avatar Apr 24 '24 20:04 segator

flying in from #121 to say this did not help fix my provisioning issue with flake + nixos-anywhere + disko + impermanence not playing nicely. commenting impermanence out unblocks provisioning.

visualphoenix avatar Jun 21 '24 04:06 visualphoenix

The nixos-anywhere + disko use case looks unrelated to what this PR is attempting to solve and should probably have its own issue. Regardless, I would also need a flake or config that reproduces the issue to investigate it further.

talyz avatar Jun 22 '24 13:06 talyz