Stream: nixos

Topic: Usr files persist after being removed from the configuration


view this post on Zulip Shivaraj B H (Feb 28 2024 at 12:01):

remotedev user was present in the configuration and was later removed

But I still see the user’s files:
Screenshot-2024-02-28-at-5.25.16PM.png

view this post on Zulip Srid (Feb 28 2024 at 12:10):

Makes sense why they are not deleted, though nixos should probably offer an option to the user here, or at least inform them. This all falls under the larger category of automatic migration of stateful data, I guess.

view this post on Zulip Tim DeHerrera (Feb 28 2024 at 13:34):

Probably the best solution to this kind of thing so far would be:
https://nixos.wiki/wiki/Impermanence

view this post on Zulip Srid (Feb 28 2024 at 17:46):

Impermenence can work for certain servers, more than shared machines. In the latter, user home directories will have various git repos checked out with direnv enabled on them, which needs to be persisted.

view this post on Zulip Tim DeHerrera (Feb 28 2024 at 18:39):

That's what the impermanence module is for. It's essentially a white list for files and directories you wish to be persisted across reboots. Everything else is wiped

view this post on Zulip Tim DeHerrera (Feb 28 2024 at 18:40):

I used to use it, haven't for a little while now, but was considering adding it again on my large build server, just to keep it clean, but then I don't reboot it very often either :sweat_smile:


Last updated: Nov 15 2024 at 12:33 UTC