I am pretty happy with my configs now, with home manager but no flakes so far. I am, however, annoyed by all the dotfiles that I didn't define, and I'm worried how many other files are laying around without getting imperatively defined.
I'm sort of picturing a kiosk mode, where every time I reboot everything is wiped and I only have what I defined. Any files I want to keep are on other partitions or network locations mapped in my config. If a new config file is created by changing a setting in an application, I want to be notified so I can add it to my Nix configs.
Is this possible? Is it a terrible idea?
The biggest challenge I see is in installing games, because it looks like they often leave bits all over the place.
I did more or less your idea with kiosk mode. Everything which is not explicitly defined by nix is on tmpfs in my setup. But I don't play games on this machine, so I can't say anything to this.
I've got the idea from "erase your darlings": https://grahamc.com/blog/erase-your-darlings/
The same thing with btrfs: https://hanckmann.com/posts/20230104-nixos-and-erasing-my-darlings/
The whole idea is about impermanence: https://github.com/nix-community/impermanence
This is fabulous - exactly what I was hoping for!
I feel like I want a easy to either detect live, or diff before shutdown, changes and file creation that I might want to add to my impermanent configs.
If you go with the btrfs option, you could change the wipe script to copy all files to a specific location and manually inspect that after reboot.
That sounds clever. I like it.
Never used BTRFS but notes a good time to learn!