cross-posted from: https://lemmy.ml/post/38988050

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here
13 comments in c/linux@lemmy.ml view that post
[–] 25 points 11 months ago

honestly, where NixOS shines for me is in my homelab. i don’t always have time to fully document what i’m doing, but my NixOS config is code-as-documentation for when work burns all of my memories away and has a git log and conflict management so i can manage multiple systems that share common config.

and once you find out you can have services run on systemd with syntax like services.jellyfin.enabled = true you’ll never want to go back to containers, although it has ways to manage those as well.

it’s overall a great OS for tinkering and deploying small services across small networks. not sure how it scales, but for my use case it’s damn near perfect

  • source
  • [–] 12 points 11 months ago

    Nice write up, I enjoyed reading this! 15-20 years ago I would have loved nix and dumping hours into configuring every little detail.

    I'm at the point now where I just want a distro I can install in 10-20 mins, copy over a couple of dot files, install a few apps, and be up and running.

  • source
  • [–] 6 points 11 months ago

    recreational coding

    Well, good news, it actually is fun to dick around in the Nix configuration and see those changes manifest on your system.

  • source
  • [–] 5 points 11 months ago

    Interesting read, thank you. Also I recognise this type of procrastination: sit down to do one thing, end up installing a whole different OS :D

  • source
  • [–] 4 points 11 months ago* (last edited 11 months ago)

    To address some negatives:

    The dot files could be generated from your nix configuration (given that they are, and usually just symlinked). This way you still keep one source of truth. Only catch is any hardcoded nix store paths from pkg stringification. Also not sure if there's an easy way to do this, besides maybe automating some way of grabbing them from your nix build. (alternatively, keep your dot files and just have nix yoink them)

    The "patch for nix" is a serious downside, admittedly. VMs and containers can get you a lot of milage, but properly nixifying things can hurt and be a big time investment.

    Dev shells and missing deps is the same. Updating deps is usually okay but "repackage everything" starts to feel bad. But you aren't limited to nixpkgs for deps; you can pull in other managers (conan, vc, etc) for the project. Issues may arise if packages need or expect FHS / system stuff, then you're back to patching and pain.

    The benefit is that when it's done, it's done; other than maintenance / upgrades. Reproducibility is like automation: the time and effort you put in, and the tools you use, determine the quality of the result. Similarly, the costs can quickly outpace the benefits.. Requires careful allocation and wise judgement.

    Nix is a silver bullet, but silver is expensive and not everyone is hunting werewolves.

  • source
  • [–] 1 point 11 months ago (4 children)

    You have Arch in NixOS? I guess I don’t understand what NixOS really is, even if I’m interested in its ability to be reproduced from one computer to another.

  • source
  • hideshow 4 child comments
  • [–] 2 points 11 months ago

    As the other person said, the bit about Arch is just the preamble.
    But you can use Nix Home-Manager on Arch (or other distros), if you're so inclined, which will give you that reproducibility for the stuff in your home-directory.

    In some ways, this is like backing up and restoring your dotfiles, but it allows you to template those dotfiles and depending on the program, it offers simple ways to populate the dotfile templates. For example, KDE applications don't generally offer very legible dotfiles and so configuring e.g. a panel via dotfiles is kind of a pain. To help with this, there's Nix Plasma-Manager.

  • source
  • parent
  • [–] 1 point 11 months ago (2 children)

    So.... is it fair to say that it's like Ansible then?

    Ok, Ansible has the config files on a separate control node, but for a multi-device setup, would that be comparable?

  • source
  • hideshow 2 child comments
  • [–] 3 points 11 months ago

    The purpose is similar, i.e. configuring a system, but I'd say Ansible works best, if you need to make a few small changes from an existing distro, whereas NixOS rather takes the approach of controlling everything about the operating system.

    And in many ways, controlling everything is actually simpler.

  • source
  • parent