Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User persistence only links/binds persistent directories, ignoring files #234

Open
Hugo-Heagren opened this issue Nov 24, 2024 · 1 comment

Comments

@Hugo-Heagren
Copy link

I am so confused.

I have a relatively simple config. It works flawlessly for system files but I also want to persist some files and some directories in my home directory (and have everything else in my home dir wiped on boot).

I have declarations in my config to persist a few different files and dirs in /home/hugo. They are all persisted (i.e. in /persist) between boots, but after booting, the only one which shows up in my home dir is config/.git -- the others are not mounted/symlinked. What could be causing this?

Some more details:

I want to persist these things: .config/git (a directory) and .config/emacs/init.el, .config/enironment.d/10-home-manager.conf, .bash_history (all files). Only the directory shows up after boots, even though I have this in /persistent:

/persistent/home/hugo
├─ .bash_history
├─ .config
  ├─ emacs
  │   └─ init.el
  └─ environment.d
  │  └─ 10-home-manager.conf -> <long nix store filepath>
  └─ git
     └─ config -> <long nix store filepath>	 

Here are some other strange behaviours:

If I run nixos-rebuild switch then all the directories necessary for this file structure are placed in my home directory: I have ~/.config/emacs, ~/.config/git and ~/.config/environment.d.

But ~/.config/emacs doesn't contain a file init.el. ~/.config/environment.d does contain 10-home-manager.conf, and ~/.config/git does contain config.

If I then reboot, only the git directory is persisted. The other two directories are removed entirely.

What's going on? What am I doing wrong?

@Hugo-Heagren
Copy link
Author

Note to self/anyone else -- discussion in #97 seems highly relevant here, though the specific errors/issues which originally motivated it are now 404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant