It was a rainy weekend, and after brewing a mugfull of coffee I sat comfortably and opened my laptop that I powered off yesterday after running an sudo pacman -Syuu yesterday to keep my Arch up to date. I like keeping things nice and up-to-date you know. The first red flags came when my fingerprint recognition wasn’t working when I tried to log in – but that’s fine, I can fix that later, not a biggie. Then the bluetooth was not seeing any devices; after 20 minutes of twiggling, reinstalling, restarting services, it did ultimately find, but didn’t cast audio through that. That’s ok, we’ve been there before, right? Wait why does my dGPU not turn on? Ok, let’s try reinstalling the drivers and cleaning some of processes, restarting. Ok now my bluetooth doesn’t work again – odd. Wait dGPU also still doesn’t work, let me remove the drivers completely… oh wait you also want to remove HIP SDK? But I need that for work… I mean, sure, ok I’ll install it again.

Morning slowly drifted to late afternoon, while I realized I have not spent a minute of that time on what I originally intended to do – recreational coding (that’s what all the normal people do on weekends, right?). After ultimately fixing all my issues I sat silently staring at my laptop, realizing I’m now roughly where I left things yesterday evening, except I burnt through a good fraction of my weekend scrolling through the Arch wiki and oftentimes toxic forums, the recurring suggestion from which was “if you can’t handle it, maybe you shouldn’t have used Arch to begin with.”

Well… maybe I shouldn’t have. …

  • BananaTrifleViolin@piefed.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 hours 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

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    11 hours 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.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    15 hours ago

    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?

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 hours 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.

    • smiletolerantly@awful.systems
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      14 hours ago

      No, not really. The imperativity of ansible vs the declarativity of nix actually does make a big difference in practice.

  • chrash0@lemmy.world
    link
    fedilink
    arrow-up
    24
    ·
    22 hours 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

    • Unforeseen@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      9 hours ago

      Same experience here, I started with a VM and then got hooked. Now I daily drive it as well.

      It sort of turned my desktop from something I didn’t ever want to mess with to feeling free to tinker with whatever I want.

      I’ve fallen in love doing things in a portable way and continually try new things with nix-shell -p program --run program

  • annoyed-onion@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    15 hours 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.

  • Dariusmiles2123@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    14 hours ago

    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.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 hours 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.

    • eleijeep@piefed.social
      link
      fedilink
      English
      arrow-up
      7
      ·
      13 hours ago

      The post is about NixOS. The intro paragraph about Arch is just a preamble to provide the motivation for switching.

  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    4 hours 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.