| 19 Jan 2025 |
jade_ | probably. i unfortunately do not have a memory | 03:24:20 |
emily | I run with /nix/tmp and it works okay but I remember there being some missing pieces to put it all together | 03:24:38 |
emily | it's also kind of an awkward flag day because migrating existing installations isn't practical | 03:24:46 |
jade_ | yes | 03:24:50 |
jade_ | indeed | 03:24:52 |
emily | so after you flip the switch some stuff will break and other stuff will start working | 03:24:57 |
emily | the stuff that breaks is stuff that should be fixed in Nixpkgs but it's still a pain | 03:25:06 |
jade_ | we could certainly make a way to do it, but it's going to be tough | 03:25:07 |
jade_ | nix-store --export into nix-store --import more or less ought to do it i think | 03:25:26 |
jade_ | or nix copy | 03:25:30 |
emily | copying GC that assumes you have 2× your heap size is painful enough when it's in memory, I'm not sure it's workable for a migration plan for disk storage :) | 03:26:08 |
emily | or if you mean path by path then I guess that could work | 03:26:20 |
jade_ | yeah | 03:26:28 |
jade_ | path by path | 03:26:30 |
emily | though it'd be awkward to invalidate paths without breaking anything, you might need some kind of overlayed store that combines them 🥴 | 03:26:34 |
jade_ | due to technical limitations there is no getting away from needing a store worth of extra space i dont think | 03:26:53 |
jade_ | unless you want to break the store in the meantime | 03:27:03 |
emily | I think /nix/store is disposable enough that just telling people to reinstall if they run into case-sensitivity issues might be the best option. but a bit sad. | 03:27:03 |
jade_ | for sure, but we could pretty easily write a cleaner migration script if you do have the space after gc'ing | 03:27:25 |
emily | if you can overlay the two stores together then you can just migrate paths in any order and purge the old ones immediately without even worrying about references. unfortunately that is probably even more brittle than the entire rest of the plan | 03:27:39 |
emily | but yeah maybe 2× disk isn't so bad I dunno | 03:27:46 |
jade_ | the issue with overlaying is that macOS is "lol lmao" as far as doing fs crmes | 03:27:58 |
jade_ | so it would not be available to the rest of the system | 03:28:10 |
jade_ | if you accept downtime of the stuff that is in the store, sure, doable | 03:28:20 |
emily | technically as of Sequoia FSKit lets you do userspace filesystems. (and before that people have abused NFSv4 for it, though whether that'd work for a store I can't say) | 03:28:46 |
emily | but yeah not worth it | 03:28:49 |
emily | would be nice if they just let you turn on case-sensitivity after the fact. | 03:29:27 |
jade_ | i can see the idea of spending a day writing a script to do the nix copy and then mount point switcheroo, but not much more than that personally; maybe someone with more desire to do darwin could | 03:29:33 |
jade_ | i think the reason it's not a thing is that it affects the hashtables on disk | 03:29:42 |
jade_ | wait a sec, can you copy_file_range or whatever macOS equivalent across APFS containers? | 03:29:57 |