nix-community / impermanence

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

Certain Files & Directories Used by GNOME Don't Work #147

Open jacobranson opened 11 months ago

jacobranson commented 11 months ago

Hello! My NixOS config is using impermanence with an impermanent home directory. This is working mostly well, with a few things that I seemingly cannot get to work, all related to GNOME. The following files are correctly persisted, but GNOME seems to overwrite them with normal files instead of the bindmounted ones regardless.

Additionally, Trash support in Nautilus seems broken when bindmounting the .local/share/Trash directory.

Is anyone else using an impermanent home with GNOME and has gotten these things working? Thanks!

Jo-Blade commented 9 months ago

Same issues here.

    dconf.settings = {

      # Désactiver la popup de bienvenue de Gnome
      "org/gnome/shell" = {
        welcome-dialog-last-shown-version = "999"; # prevent popup until gnome version 999 :)
      };

    };
maydayv7 commented 8 months ago

Additionally, Trash support in Nautilus seems broken when bindmounting the .local/share/Trash directory.

The FreeDesktop Specification mentions that the ~/.local/share/Trash directory mustn't be a symbolic link in order to be used as intended. To preserve it's functionality, I've been using this workaround instead of persisting that directory using impermanence

Also note that this is not a GNOME-specific issue

(user.homeConfig --> home-manager.users.$USER)

MordragT commented 8 months ago

@maydayv7 thanks for sharing your workaround. I am wondering is this also working for you when deleting files within bind mounted directories (in Home) ? Because I believe I have read somewhere that nautilus (or more specifically gvfs) will not move files across different filesystems to put them into trash. I would have thought that then nautilus will just create .Trash dirs inside each bindmount root but that does not seem to be the case atleast on my machine. I have tried different file managers and only dolphin does that described behaviour.

maydayv7 commented 8 months ago

I am wondering is this also working for you when deleting files within bind mounted directories (in Home) ?

This is not the same issue as above

I would have thought that then nautilus will just create .Trash dirs inside each bindmount root

Yes, it will try creating a .Trash folder in the topmost mount directory, and might fail due to insufficient permissions. Try using gio trash /path/to/file/to/delete and see if it throws an error.

MordragT commented 8 months ago

It seems like glib has a Bug which is why trashing files from within bind mounts is not working. This seems to be the related issue https://gitlab.gnome.org/GNOME/glib/-/issues/1885

maydayv7 commented 8 months ago

Oh okay, in my case I mount ZFS datasets to something like /data and trashing works perfectly with any gvfs-based file managers (once permissions are sorted)