1. 27
  1. 8

    For those who are nix-curious but don’t want to completely mess up their system, I’m finding home manager to be a great way to get stuff started (caveat: Ubuntu user, maybe this is harder on other systems).

    NixOS is what you need if you want to like… declaratively configure your whole system etc etc, but home manager solves the thing that I really just want: make sure that stuff is set up right in my home folder, and install programs on my computer.

    I still gotta go poke around in the home manager repo a bunch to figure out how to use anything (I get it’s work, but I really wish that there was just browsable web docs with examples for each package…). But at least so far it’s been good.

    1. 9

      I’d highly recommend just Nix for quickly testing random packages. Just nix-shell --packages PACKAGE as an unprivileged user and off you go. Ctrl-d when you’re done.

      1. 3

        Standalone Nix -> home-manager -> NixOS is a great progression to learn with, and you get a lot of benefits just from the first step. It is such a relief to be able to clone a package and run nix develop, knowing that everything you need will be available..

      2. 4

        I’m finding home manager to be a great way to get stuff started

        I couldn’t agree more with the advise to start out slow. I personally pulled nix into my life piece by piece. From a humble start of just using nix-shell and whatnot to get access to software, like switching a few Haskell projects over from stack. Then I started doing manual dotfile management on non-NixOS using nix-env. Then came NixOS, then Home Manager, then nix flake … And I’m fairly certain it doesn’t stop here.

        I did a writeup of my dotfiles journey a few months back that details a bit of this: https://myme.no/posts/2022-04-11-a-dotfile-history.html

      3. 4

        Oh wow, there’s so much good stuff here I need to study & steal borrow, and presented in a very understandable way given my level of Nix-fu, and then the website is really pretty and with a nice layout as a cherry on top (…which I should probably steal from too for my Some Day To Be Blog™…). Huge thanks for sharing! <3

        edit: FWIW, I do have an RPi 4B (or whatsit, don’t recall exactly) collecting dust in a corner while proudly running NixOS - do recommend for a fellow dust collector! Basically the only thing I vaguely recall was non-trivial (a.k.a. stress-inducing) was switching the boot config to aarch64 or something like that. Unfortunately, I did it so long ago, that I’m not currently sure where I stored the script that did this so that I could share it 🤔 😔

        1. 1

          Thanks for your kind words. Nothing would honor me more than somebody steal^Wborrowing from and getting inspired by my online work.

          I don’t do tags on my blog, but the nix-relevant posts typically have “NixOS:” in their title - so you might find some of the previous posts useful if you’re diving head first into nix.

          1. 2

            I’m already happily using home-manager on several heterogeneous machines, so I’m primarily interested in “comparing notes”, esp. given that yours looks prettier ;) also WSL is something I haven’t explored with Nix recently (I did long ago but both WSL and Nix were less mature then). But maybe I’ll look in the other NixOS articles too, if you suggest so!