You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 here
Problem
Every single time the system boots, the home directory is regenerated (because of tmpfs), so all files in ~ are deleted (including the user systemd 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 run rm -rf ~ before re-applying, else it errors out with this message:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
and the home-manager configuration is not applied. It is also not possible for me to define a user systemd 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 option home.file are present on login, w/o any interference from the user.
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!
maydayv7
changed the title
Understanding workflow for the home-manager module
Systemd service not starting use home-manager as a separate function
Oct 29, 2021
maydayv7
changed the title
Systemd service not starting use home-manager as a separate functionsystemd service doesn't start if home-manager is not used as a nixosModuleJan 8, 2022
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
The text was updated successfully, but these errors were encountered: