nix-community / impermanence

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]
MIT License
1.09k stars 80 forks source link

Error installing file outside $HOME #69

Closed maydayv7 closed 2 years ago

maydayv7 commented 2 years ago

While using the impermanence module for home-manager and trying to persist .mozilla (for Firefox), I get the following error:

$ sudo nixos-rebuild boot --flake /etc/nixos
Applying Configuration...
building the system configuration...
error: builder for '/nix/store/pd68csjfh8k48gvsi72k5gr2awnjvg5d-home-manager-files.drv' failed with exit code 1;
       last 1 log lines:
       > Error installing file '.mozilla/firefox/profiles.ini' outside $HOME

This may be due to the presence of symlinks in .mozilla, because I use home-manager to manage my Firefox config

Relevant parts from configuration:

{
  home-manager.users.${username} = {
    imports = [ nixosModules.home-manager.impermanence ];
    home.persistence."/persist/home/${username}".directories = [ ".mozilla" ];
    programs.firefox = {
      enable = true;
      profiles.${username}.settings = {
        # Settings
      };
    };
  };
}

Apart from this, impermanence has been amazing! Thanks a lot :)

maydayv7 commented 2 years ago

Fixed by #70. Thanks a lot!