Open GetPsyched opened 5 months ago
Have the same issue with zfs. Did you find the solution rather than using tmpfs?
I found a solution without sacrificing my tmpfs
! I simply made a manual bind mount:
# making a separate subvol is entirely optional. I simply did it for convenience.
fileSystems."/persist/steam" = {
device = "/dev/mapper/cryptroot";
fsType = "btrfs";
options = [ "subvol=${subvol},compress=zstd,noatime" ];
neededForBoot = true;
};
fileSystems."/home/getpsyched/.steam" = {
device = "/persist/steam/.steam";
fsType = "none";
options = [ "bind" ];
noCheck = true;
};
NOTE: Before launching Steam, move .local/share/Steam
to some place that's persisted but not touched by impermanence. When Steam launches, it will ask whether the installation was deleted or moved; select moved and point it to the new location. Done. Steam should now run normally.
I found a solution without sacrificing my
tmpfs
! I simply made a manual bind mount:# making a separate subvol is entirely optional. I simply did it for convenience. fileSystems."/persist/steam" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = [ "subvol=${subvol},compress=zstd,noatime" ]; neededForBoot = true; }; fileSystems."/home/getpsyched/.steam" = { device = "/persist/steam/.steam"; fsType = "none"; options = [ "bind" ]; noCheck = true; };
NOTE: Before launching Steam, move
.local/share/Steam
to some place that's persisted but not touched by impermanence. When Steam launches, it will ask whether the installation was deleted or moved; select moved and point it to the new location. Done. Steam should now run normally.
Thank you for the reply! I’m just curious but Is there a reason not choosing to bind .local/share/Steam
into /persist/steam/.local/share/Steam
?
Well, initially I tried binding just .steam
since it stores the important login details, .local/share/Steam
is just state (I store my games elsewhere). But once this worked, I tried binding .local/share/Steam
to /persist/steam/Steam
but got some error that I don't recall unfortunately. Since moving the location on Steam worked and I was already tired of this issue, I didn't try any further. (if it works, don't touch it xD)
Persisting
.local/share/Steam
either with bindfs or as a symlink causes Steam to partially break. Any time I open it, it fails to launch any game, and if I try to shut down Steam, it gives the following log with the last line repeating every X seconds.This also blocks any
nixos-rebuild
commands, system shutdown, and even just listing either.steam
or.local/share/Steam
usingls
I have been having this issue for months now and the only solution is to not persist Steam and run it off of my
tmpfs
. Also, FYI, I'm using BTRFS.