News for hackers. Stuff that matters.
Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by lijogdfljk on Tuesday September 14, 2021 @06:43PM (#28532524)
This is interesting. One of my major complaints of Nix (of which i'm typing on, NixOS) is that my app states easily clobber each other. Ie moving between large nix changes can break, and even rolling back is broke, because the state is not managed in the same safe way that apps themselves are.

If this solves that problem i'd definitely be interested in trying it out. As the only thought i had was manage to put 100% of my state into my nix config which seems.. a nightmare.

Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by SkyMarshal on Tuesday September 14, 2021 @09:39PM (#28534143)
As a (new) NixOS user too, I'd be interested to hear more about this.

Have you tried setups like "Erase Your Darlings" and "NixOS: tmpfs as root" to explicitly persist and manage state?

https://grahamc.com/blog/erase-your-darlings

https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/

Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by lijogdfljk on Wednesday September 15, 2021 @10:25AM (#28539435)
Nope, but that's exactly what i had in mind when i said "put everything in my nix config". Any setting for my desktop, browser, etc would need to be in that config. The tempfs would just help me practice it.

Big PITA though, imo. At least until i'm "better" at Nix.

Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by SkyMarshal on Wednesday September 15, 2021 @07:21PM (#28545734)
I spent about 3-4 months learning Nix/OS this past spring/summer. After some trial and error and source code spelunking, I finally got my system working according to these two blog posts, with some tweaks [1]. It was a lot of work to ramp up that learning curve, but now that I have I don’t think I can ever go back to another standard Linux again. They all feel so messy and disorganized now by comparison.

[1]: Some things, notably containers like LXC/LXD, can’t work with tmpfs mounted to /var, /var has to be on disk, while the rest of / can be tmpfs.

Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by nerdponx on Tuesday September 14, 2021 @07:20PM (#28532864)
For a non-Nix user, what do you mean by "app state"? Things like config files?
Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by lijogdfljk on Thursday September 16, 2021 @10:29AM (#28552287)
Correct. Though sometimes apps also store little files as local databases, effectively, and switching versions of the apps can jack with that file as well. Making rollbacks more difficult
Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by isr on Tuesday September 14, 2021 @07:57PM (#28533221)
Could you elaborate a bit on this? Not arguing, genuinely interested ...
Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by fouc on Tuesday September 14, 2021 @06:57PM (#28532646)
I'm surprised the app state isn't backed up so that rolling back restores it?
Re:Spectrum OS: a declarative, reproducible, compartmentaliz... by seniorivn on Tuesday September 14, 2021 @07:12PM (#28532777)
you can use fs snapshots and backups