Closed maydayv7 closed 2 years ago
Hi! To automatically set up home-manager when using impermanence, it's easiest to use home-manager's NixOS module (it's in the nixos
directory of the home-manager repo). It will activate the configuration in a systemd service on boot before you log in and therefore also solve the conflict problem you're seeing. I guess this info really should be in the readme.. Sorry about that!
Okay, thanks a lot!
Hi, I'm pretty new to Nix, and am trying to use the impermanence
home-manager
module in my configuration (using Flakes), and I have some difficulties understanding how it all works. You can find my dotfiles hereProblem
Every single time the system boots, the home directory is regenerated (because of
tmpfs
), so all files in~
are deleted (including the usersystemd
units to bind-mount the directories), and I need to re-apply the user configuration every time after login to get back all the files, which I hope isn't the desired method of operation. Also, I must runrm -rf ~
before re-applying, else it errors out with this message:and the
home-manager
configuration is not applied. It is also not possible for me to define a usersystemd
service to re-apply the configuration on login, so every boot requires a manual rebuild, which is not ideal.Expected Behaviour
The directories (both the persisted ones and the ones linked using the
home-manager
optionhome.file
are present on login, w/o any interference from the user.Important Configuration Files
shortened, for decreasing complexity
flake.nix
filesystem
modulelib/user.nix
persist
moduleCommand for applying user configuration (since, I'm using
home-manager
as a separate function instead of conventionally importing the module)Also, if this behaviour is irregular, please point out what is being done wrong in my configuration