1. 15
  1. 4

    I found a cheat code to enjoy most of the benefits from NixOS for “free”. I have two M1 macs (a mini and an air) with VMWare Fusion and I use Mitchell Hashimoto’s config that he published a while ago.


    I didn’t have to learn how to set everything up to get a usable machine; I basically learn stuff as I need it, and in the meantime I get a comfortable solution that I can trivially keep in sync between two different machines.

    1. 1

      Similar story for me - I bought a new personal M1 MBP and felt some reluctance about bootstrapping from dotfiles for the umpteenth time, plus dev environment setup angst. I also followed Mitchell’s config, but modified for Parallels instead of VMWare (which required this patch to make the macOS integrations work).

      Instead of Terminal.app or iTerm2, I ⌘-Tab to a fullscreen NixOS VM and treat it like my local dev terminal. It pretty much works great. I like having a single declarative description of a dev environment tuned to my liking, and knowing that I can recreate trivially almost anywhere. Like @kristoff it’s also been a nice no-pressure excuse to learn NixOS and Nix and nixpkgs.

    2. 1

      In my opinion, server settings are where NixOS shines the most!

      I was curious about that one recently. On a Mac if I need to install something, I just do it and if it’s big enough I’ll check back in 10min - it mostly works. (ignoring all the other problems) Maybe run gc once a week and clean up 40GB of trash. But I wouldn’t want to attempt that on an RPi class hardware. How do people deal with that? Some external compilation service/cache? I mean cases where it turns out you’re about to compile llvm on your underpowered Celeron based NAS.

      1. 3

        Some external compilation service/cache?

        Basically yeah, its pretty easy to setup and defer to something else to build: https://sgt.hootr.club/molten-matter/nix-distributed-builds/

        1. 1

          Unless I’m misunderstanding, you want to target revisions of nixpkgs channels which are already built as per: https://status.nixos.org

          1. 1

            I’m on a rolling release, but it’s not perfect. Specifically, some updates are not built yet at the time of installation. Also changing since configs means recompiling anyway (for example if you want to enable jit in Ruby)

            1. 2

              Specifically, some updates are not built yet at the time of installation. I guess for something like a raspberry pi your best option would be to stick to a release instead of nixos-unstable. For unstable or configs which are not in upstream caches you’d need some kind of external cache (which could be your desktop machine), yes.

              One pitfall I ran into when using a stable release was using release-21.11 which also includes upgrades which are not yet built, switching to nixos-21.11 solved that.