[HN Gopher] Not-OS - NixOS-based OS generator that outputs an OS...
       ___________________________________________________________________
        
       Not-OS - NixOS-based OS generator that outputs an OS with 47MB
       squashfs (2022)
        
       Author : peter_d_sherman
       Score  : 100 points
       Date   : 2023-02-06 15:44 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | mike_hock wrote:
       | A kernel, initrd, and 47MB squashfs, making the squashfs the
       | smallest of the three.
        
       | jbverschoor wrote:
       | Very tempting to start using a combination of nix and qubes
        
         | flurie wrote:
         | You may be interested in Spectrum OS[1], which is more or less
         | what you're looking for.
         | 
         | [1] https://spectrum-os.org/
        
       | superkuh wrote:
       | This is the kind of NixOS project that makes sense; unlike all
       | the people cargo culting it as a desktop OS.
        
         | tripdout wrote:
         | It works perfectly fine (even better, I'd say, than other Linux
         | distributions) as a desktop OS. Currently running it on both a
         | laptop and a desktop, and not sure what you're referring to.
        
         | avgcorrection wrote:
         | It is an OS. Do you know what "cargo cult" means?
        
       | airtonix wrote:
       | [dead]
        
       | Jhsto wrote:
       | A slight optimization here could be to use in-kernel dhcp for
       | init1 netbooting instead of packaging dhcpd and then sleeping for
       | 5 seconds during the bootup to get a lease -- last time I tried
       | it the in-kernel version ensures a lease is acquired before the
       | init script is run.
        
       | peoplearepeople wrote:
       | > An operating system generator, based on NixOS, that, given a
       | config, outputs a small (47 MB), read-only squashfs for a runit-
       | based operating system, with support for iPXE and signed boot.
       | 
       | > runit is a cross-platform Unix init scheme with service
       | supervision, a replacement for sysvinit, and other init schemes.
        
       | ncr100 wrote:
       | Q: What is an example usage? What have people used read-only *NIX
       | installations for? Would this be especially suitable to run
       | virtually?
       | 
       | The author has game related repos on GH and I speculate a usage
       | they are considering is to setup an emulation station.
        
         | nine_k wrote:
         | Would be perfect for a small VM, or a container. Writable
         | storage can be mounted separately where needed.
        
       | pxc wrote:
       | This is actually a really long-standing project by now! Michael
       | has been a Nixer for a long time. He's very helpful and quite an
       | adept Nix hacker. When I was first getting started with NixOS he
       | gave me a lot of help in IRC for some packaging issues (Nixpkgs
       | was less than 25% of it's current size back then, IIRC!) and
       | inspired me to knuckle down and learn the Nixpkgs codebase by
       | reading it.
       | 
       | Cool to see his work show up here. :)
       | 
       | Fans of slimmer and systemd-less spinoffs of NixOS should perhaps
       | also check out NixNG: https://github.com/nix-community/NixNG
        
         | trynewideas wrote:
         | > Fans of slimmer and systemd-less spinoffs of NixOS should
         | perhaps also check out NixNG
         | 
         | So a primary difference from NixNG is that not-OS has a kernel
         | and initial RAM disk, making it viable for running on hardware?
         | The sparse README says it's for "embedded" purposes, but I'm
         | struggling to understand the value of Nix here if the whole
         | filesystem is read-only -- you'd be working entirely off the
         | RAM disk?
        
           | vlovich123 wrote:
           | The Linux boot image is a squashfs image loaded into memory
           | by your boot loader (eg grub). It can still mount other
           | filesystems for on-disk partitions (provided the relevant
           | file system and drivers are compiled into the kernel). 50MiB
           | is a bit on the heavy side for many embedded use cases (ie M0
           | devices). It's possible M3/M4 CPUs have enough storage and
           | RAM to support this. It's been a while since I checked the
           | specs for those chips.
        
             | monocasa wrote:
             | Embedded is a broad category. Yeah, this is a bit
             | heavyweight for Cortex-M, but so is Linux just kind of in
             | general. This would be great for a Cortex-A class SoC.
        
           | nine_k wrote:
           | In an embedded system you likely have all the _code_ on a
           | read-only filesystem which is the device 's flash storage.
           | You can have a separate device for writable storage (an SD
           | card, another piece of flash, etc), or operate on a RAM disk
           | entirely if all you need is storing runtime-only data. The
           | latter is how OpenWRT operates, for instance.
        
           | touisteur wrote:
           | Wondering now whether it'd be a good fit for microvms too.
        
       ___________________________________________________________________
       (page generated 2023-02-06 23:01 UTC)