13 ms·
Spectrum OS: a declarative, reproducible, compartmentalized Linux
- imwillofficial 5y agoWould this be comparable to QubesOS?
- bttger 5y agoThey wrote something about it here: https://spectrum-os.org/motivation.html https://spectrum-os.org/motivation.html
- mrobot 5y agoSome more history here https://alyssa.is/leaving-freeagent/ https://alyssa.is/leaving-freeagent/
- gurjeet 5y ago> I was told “you work for the internet now” Whoever said that, such wise words. Never thought of it this way, but it truly reflects how it feels to work on open-source projects; no national, religious or corporate boundaries to honor is just liberating!
- account-5 5y agoHow does it compare to NixOS?
- X6S1x6Okd1st 5y agoLooks like this is a distro based off of nixos
- outworlder 5y agoDoesn't seem to be the case. They are using Nix too(the package manager), but I couldn't see other similarities. I think they are completely different from NixOS. For starters, they want to run every app inside crosvm.
- eyelidlessness 5y agoFrom their Design page: > Spectrum will, for now, be a Linux-based system, derived from NixOS.
- notimrelakatos 5y agoSeems to be that "what would happen if NixOS and Qubes had children" scenario. Glad to see Nix propagating itself, the fundamental ideas are right, maybe what we need is different people trying to implement more stuff atop it, so even if NixOS dies the ideas live on.
- outworlder 5y agoGlad to see that they are using Nix, was momentarily concerned about duplication of effort. I've moved all my machines to NixOS, and even replaced Homebrew with Nix on my work OSX laptop(with home-manager). It's a rather refreshing system. Being able to use nix-shell and temporarily install one-off packages is also great. The motivation behind this system sounds great.
- deleted 5y ago[deleted]
- voidnullnil 5y agoWow so many commas. Must be good.
- throwaway894345 5y ago> The host system and isolated environments will all be managed declaratively and reproducibly using Nix, a purely functional package manager Nix seems cool, but all of my forays into it have been so unpleasant as to be unworkable. It seems to work well enough if all of your dependencies are already in the Nix store and have been thoroughly tested, but as soon as one has to start writing Nix packages themselves it's a train wreck: the peculiarities of the Nix expression language, the chaos and lack of documentation in nixpkgs, the immense understanding one must have of the common low-level libraries used to create Nix packages, and you'll still spend tons of time trying to package obscure C dependencies with their own bespoke build systems. My constructive feedback is: 1. Add types to the Nix expression language so someone digging through the code can have some idea about what needs to be passed into various functions. This would probably help people traverse nixpkgs as well, since the client code will need to "import" the types of its arguments. 2. Make Nix more syntactically familiar. Familiarity here seems like it should be more important than innovating on programming language syntax. Thanks for not going full-Haskell on us, but it would be nice if looked more like JavaScript or Python or something that virtually any programmer could look at and recognize (I'm no great fan of either of those languages). 3. Very controversial, but the whole industry needs to minimize the number of C and C++ dependencies. Not only are these languages fundamentally insecure, but projects in these languages have their own bespoke build systems which assume dependencies are already installed at the correct versions and in the correct paths. Packaging these projects is painful, and it's largely the reason we have package maintainers who specialize not in building programs of a certain language, but in building certain dependencies.
- tinco 5y ago> Thanks for not going full-Haskell on us It would have been so much better if they went full Haskell. Haskell is better designed as a language, it has types and could support all Nix features without modification as far as I can tell. On top of that it's a common language that most have used at least in university and has loads of friendly tutorials online. Totally agree on the packaging of C/C++ projects is a drag of our entire industry and basically a complete embarrassment.
- 5y ago
- lijogdfljk 5y agoThis 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.
- fouc 5y agoI'm surprised the app state isn't backed up so that rolling back restores it?
- seniorivn 5y agoyou can use fs snapshots and backups
- nerdponx 5y agoFor a non-Nix user, what do you mean by "app state"? Things like config files?
- lijogdfljk 5y agoCorrect. 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
- isr 5y agoCould you elaborate a bit on this? Not arguing, genuinely interested ...
- SkyMarshal 5y agoAs 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://grahamc.com/blog/erase-your-darlings https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/
- throwaway984393 5y agoIt's a nice idea but it won't gain traction as it's still designed with 2000's era computing in mind. Nobody manages an entire complex system within a specific Linux distribution anymore. There is a vast ecosystem of tooling, systems, protocols, networks, services, that comprise modern distributed systems. All these things exist regardless of the Linux distro. In fact, I will predict right now the death of Linux as a dominant backend computing platform. It's sort of happened already. Sure, Linux is the kernel that runs the host machines that the cloud runs on. But the services are increasingly serverless/kernel-less, or run on micro-vms running either Linux or another kernel, or run in containers made of a half dozen different base distros. All the Linux I/O is just passed to an outer layer with a universal adapter, so you can mix and match networking, filesystems, logging platforms, policy governance, orchestration, scheduling, etc. I spend nearly all of my time building systems by tuning software and services that have almost nothing to do with Linux. Linux distros will still be around in one form or another. But long gone are the days where most people define their system or security based on a particular distro. Hell, most of the software used in the cloud today isn't even packaged by distros. Linux has become just a kernel again, the distros just a fancy installer for GNU tools. They're using a lot of advanced tech and advertising having to "maintain fewer virtual computers", whatever that means. But it also seems their tech is more complex and less compatible with existing components. There's no clear idea of how a developer's supposed to take their code on their laptop, test it, and ship it to production as one immutable image. If it's not as simple as containers, it's not going to replace them. Also, it's interesting that they seem to allude to immutability, but don't mention the principle by name at all. It seems like whomever is developing this doesn't run large distributed systems.
- seniorivn 5y agoyou missed the fact that it's nixos based. It means it is a system to declaratively define compartmentalized well integrated(including GUI) system, at the moment it's based on Linux and other regular Gnu/Linux but it could relatively easy change any of them
- SkyMarshal 5y ago> Interestingly, of all the buzzwords this distro uses, none include "immutable", which is the single most important concept in modern systems. Since this system is based on NixOS and the Nix package manager, immutable is implied. Any change you make to a Nix/NixOS system results in a full rebuild of the system, and pointers to the new system updated. Current and all prior builds remain immutable.
- 1MachineElf 5y agoLatest update from the developer: https://spectrum-os.org/lists/archives/spectrum-devel/20210822213036.6lx5hb2my3bsgrxy@eve.qyliss.net/T/#u https://spectrum-os.org/lists/archives/spectrum-devel/202108...
- Razengan 5y agoThe default shell should be BASIC, as a homage to the ZX Spectrum.
- yewenjie 5y agoOh this is so interesting. I switched to NixOS (with Flakes) about a week ago and will really love to see more projects in the ecosystem.
- mikepurvis 5y agoI'm a recent Nix convert who also loves flakes and nix-cli and would love to see them get out of unstable and the docs updated to direct users toward them.
- SkyMarshal 5y agoMy last understanding is that Flakes are slated to go into stable in the next NixOS version 21.11 this fall. Do you know if that's still the case? I'm still just using configuration.nix for everything, haven't migrated to Flakes yet.
- mikepurvis 5y agoThe main issue for me is that I'm working on packaging for a proprietary project where the ability to have an overlay flake and lock all my dependencies is critical. So I'm doing this with a flake and it works great, but I really didn't want to have to learn the old-and-busted way of doing it only to have to migrate later, particularly when the ergonomics of flakes is so great.
- lom 5y agoNo. Flakes will be stabilized with nix version 3.0, while the current nix-unstable release is 2.4pre-something. See the roadmap here: https://discourse.nixos.org/t/nix-release-schedule-and-roadmap/14204 https://discourse.nixos.org/t/nix-release-schedule-and-roadm...
- mikepurvis 5y agoI don't love that a post from July talked about stabilizing and releasing 2.4 "in the next few weeks", and now it's September with still no release. OTOH, the list of milestone issues is pretty short: https://github.com/NixOS/nix/issues?q=is%3Aopen+is%3Aissue+milestone%3Anix-2.4 https://github.com/NixOS/nix/issues?q=is%3Aopen+is%3Aissue+m... I expect the delay is mostly due to all this debate raging about `nix shell` naming and semantics: https://github.com/NixOS/nix/issues/4715 https://github.com/NixOS/nix/issues/4715
- ilovetux 5y agoI have to say that their landing page is great. Short, sweet and to the point especially their `Development progress` and `Getting involved` sections. I'm going to give it a try.
- robocat 5y agoAlyssa wrote some background behind the project: https://alyssa.is/leaving-freeagent/ https://alyssa.is/leaving-freeagent/ “When I had a call with [the project sponsor] NLnet recently, I was told ‘you work for the internet now’. And that evoked the most powerful feeling of purpose and drive I’ve ever felt in my life.” “Although my funding is for Spectrum, I expect to be able to work on free software much more broadly over the next year. Certainly, a lot of my work will make its way into Nixpkgs, which I was very excited to receive commit access to some months ago due to my other work on it. And there are some further projects of my own to come as well. In addition to working on Spectrum, I’d like to diversify my funding. I hope to be able to take donations for my free software work on Spectrum and other projects, to make this important work truly sustainable for me. I couldn’t sensibly do this before, because I couldn’t guarantee that I’d have any time to spend working on what people would be giving me money for, but, in this new arrangement, I have a lot more freedom and capacity to choose how I spend my time. I don’t expect donation income to pay my bills, or even be significant, but I’d like to explore it, and until now I haven’t had the space to do that.”
- w0mbat 5y agoAnything called "Spectrum OS" should have something to do with the Sinclair ZX Spectrum. For people who grew up with Sir Clive's cuddly 8-bit masterpiece, the word "Spectrum" has too much history in the context of computers to be casually reused like that.
- ncmncm 5y agoSorry, no. Rather, nothing should be named "Spectrum". There is a reason trademarks use unique spelling. Projects should use unique spelling. There is no shortage of spellings.
- veltas 5y ago> nothing should be named Apple
- ncmncm 5y agoFunny choice, considering the amount of litigation over that name. Unless you were serious. When Apple started, they were sued by Apple Records, the Beatles' label, and settled with a pledge to never have any activity involving music distribution. Come iPod, they turned around and sued Apple Records.
- veltas 5y agoIt's a good example, you can have recognisable trademarks be common words. The trademark is restricted to particular contexts, of course -- you cannot trademark 'apple' in general.
- ncmncm 5y agoIt is foolish to choose a name that Google prefers to direct people to 143,000 unrelated other pages.
- w0mbat 5y ago...and then Sir Clive died pretty much the next day. RIP my bearded friend.
- a-dub 5y agothis is actually a really interesting problem i've been pondering quite a bit recently. what would it actually take to get to actually secure computing assuming one was able to start with a clean slate? it seems like getting away from memory unsafe languages is a pre-requisite, but beyond that... how do you build a computer system with thousands of pieces of software authored by different people with thousands of inputs that are controlled by different entities that produces output you can really trust, and verify... like not tamper resistant, but actually tamper proof with verifiable outputs. and well, also not a huge step back in performance and usability. in reality, maybe something like this that builds on existing primitives to get there may be the only real, feasible thing... but assuming you could start from scratch, what would it look like?
- fsflover 5y ago> what would it actually take to get to actually secure computing assuming one was able to start with a clean slate? > getting away from memory unsafe languages How about secure virtualization and security through isolation instead? See Qubes OS.
- a-dub 5y ago> How about secure virtualization and security through isolation instead? See Qubes OS. yeah, that's kinda what i meant by "something like this that builds on existing primitives to get there may be the only real, feasible thing". it looks like qubes uses vms as an existing (heavyweight) primitive to limit blast radii for existing software and systems. i wonder if you can do better if you start from scratch.
- fsflover 5y ago> existing (heavyweight) It's not exactly heavyweight, because Xen hardware virtualization eats up only additional 10% of CPU. However, GPU acceleration is switched off for security reasons.
- ncmncm 5y agoHow can I send money? I give to QubesOS every month, already. QubesOS uses OpenCollective to administer donations, which seems to work.
- ncmncm 5y agoWhat I miss most in QubesOS is ability to connect my GPU hardware to a specific VM (or app, or container) the way I do the mic, camera, and USB peripherals. I don't need it for rendering the browser GUI, where the CPU is wholly adequate, but it would be helpful for e.g. mpv, and as a back-end for OpenCL/OpenMP programs. This seems like it ought to be much easier than trying to share such a GPU with multiple VMs simultaneously. The problem seems to be how to do it securely. You could imagine faking GPU hardware for the VM image to talk to. But maybe Vulkan would be a better API? Has any work been done on a wrapper forwarding calls that refer to VM-mapped addresses to a native Vulkan? (What happens in WSL2?) I find Kompute ( https://github.com/KomputeProject/kompute https://github.com/KomputeProject/kompute , https://www.youtube.com/watch?v=Xz4fiQNmGSA https://www.youtube.com/watch?v=Xz4fiQNmGSA ) that seems to be a serious attempt at building general computation infrastructure on top of Vulkan. Is exposing a Vulkan wrapper, and building compute kernels on top of that, a practical avenue? This all seems like something someone must have throught through already, but I have not found anything published about it.
- pabs3 5y agoConnecting hardware to an app VM seems like a bad idea, better for the hardware to be managed in a specific VM, passing out an audio/video stream then individual audio/video/input streams sent to app VMs. On Linux pipewire is meant to do the audio/video part. I there are probably virtio protocols for GPU stuff, the Spectrum design page mentions one for Wayland.
- ncmncm 5y agoBut I'm not interested in video streams. I want computation.
- fsflover 5y ago> ability to connect my GPU hardware to a specific VM You can do this if you have a second GPU: https://www.qubes-os.org/faq/#can-i-run-applications-like-games-which-require-hardware-acceleration https://www.qubes-os.org/faq/#can-i-run-applications-like-ga... https://forum.qubes-os.org/t/qubes-gpu-passthrough/661 https://forum.qubes-os.org/t/qubes-gpu-passthrough/661 https://forum.qubes-os.org/t/another-2-gpu-passthrough-post/2821 https://forum.qubes-os.org/t/another-2-gpu-passthrough-post/...
- 1vuio0pswjnm7 5y ago"ucspi-vsock UCSPI-1996 implementation for Linux AF_VSOCK sockets 6 months" https://spectrum-os.org/git/ https://spectrum-os.org/git/ Neat! I still use djb's ucspi all the time. (stunnel or haproxy to add TLS support) https://cr.yp.to/ucspi-tcp.html https://cr.yp.to/ucspi-tcp.html
- LargoLasskhyfv 5y agoI'm wondering if she's aware of http://skarnet.org/software/s6-networking/ http://skarnet.org/software/s6-networking/ ?
- fsflover 5y agoSee also: https://news.ycombinator.com/item?id=26378854 https://news.ycombinator.com/item?id=26378854 Qubes-Lite with KVM and Wayland (roscidus.com) 141 points by todsacerdoti 6 months ago | 48 comments