I do this on NixOS. I have a NAS at home where I store most of the files I work on. My computers are internally immutable and almost all the files that change reside solely on the NAS as NFS shares. All of my computers are configured to auto-mount one of its folders at boot. NixOS sees that as an internal drive.
Then, simply navigate to the project folder where I have a flake and a .envrc file containing the command use flake .
which will make direnv use Nix to provision the dependencies automatically. Whenever I save, those changes are reflected on all computers.
I like to also version control everything using git and this method allows that transparently.
The only part that I am missing is getting the permissions to align between all computers accessing that same folder. Sometimes I have to create a temp folder that uses rsync to keep up with any changes. If anyone has any pointers, I’m all ears. It rarely gets in my way but does rear its head sometimes. Otherwise, this setup is perfect when I’m at home.
I’m genuinely curious why you’d want to do that. Mine is timed to coincide with the circadian rhythms of the GPS coordinates and those are provided as hard-coded values in my config. I suppose the only optimization I could imagine is a script where it would get my IP then correspond that with GPS coordinates so I could have circadian screen coloring wherever I go with my laptop.
My point is, it’s a setting that I don’t turn off because that would defeat the purpose of the app.