Andrew | I was advised to ask here instead of https://matrix.to/#/#users:nixos.org.
I installed home-manager flake on Pop!_OS 22.04 a few weeks ago and since then I got a few programs crashed when opening a home dir. I finally got to the bottom of this and renaming ~/.local/state/nix/profiles/profile to anything else fixes it. Or removing ~/.nix-profile/share from XDG_DATA_DIRS. Can someone explain why that happens and how can I fix this without launching all the problematic apps with env?
strace nautilus:
...
futex(0x62f00be67740, FUTEX_WAKE_PRIVATE, 1) = 1
openat(AT_FDCWD, "/usr/share/icons/Pop/scalable/actions/bookmark-new-symbolic.svg", O_RDONLY) = 26
statx(26, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=208, ...}) = 0
read(26, "<svg viewBox='0 0 16 16' xmlns='"..., 8192) = 208
read(26, "", 8192) = 0
close(26) = 0
openat(AT_FDCWD, "/usr/share/icons/Pop/scalable/actions/bookmark-new-symbolic.svg", O_RDONLY) = 26
statx(26, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=208, ...}) = 0
read(26, "<svg viewBox='0 0 16 16' xmlns='"..., 65536) = 208
read(26, "", 65536) = 0
futex(0x7f02b05cf600, FUTEX_WAIT_PRIVATE, 2, NULL) = ?
+++ killed by SIGSEGV (core dumped) +++
zsh: segmentation fault (core dumped) strace nautilus
rg '\bnix' trace.log | lines gives 778, rg '\bnix' trace.log | rg 'No such file or directory' | lines gives 681, which are basically:
newfstatat(AT_FDCWD, "/home/user/.nix-profile/share/icons/gnome/index.theme", 0x7fffe3436c90, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/user/.nix-profile/share/pixmaps/gnome/index.theme", 0x7fffe3436c90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/user/.nix-profile/share/icons/icon-theme.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/user/.nix-profile/share/pixmaps/icon-theme.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
gdb says this 0x00007ffff7278a2d in ?? () from /lib/x86_64-linux-gnu/libgio-2.0.so.0.
env | rg -i gio:
GIO_LAUNCHED_DESKTOP_FILE_PID=18591
| 14:34:12 |