I’m currently running Arch and it’s great, but I’m noticing I’m not staying on the ball in regards to updates. I’ve been reading a bit about Nix and NixOS and thinking of trying it as my daily driver. I’ve got a Lenovo x1 xtreme laptop, I don’t do much gaming (except OSRS), use firefox, jetbrains stuff, bitwarden, remmina, obsidian, and docker.

Is anyone running NixOS as their daily? How are you liking it and are there any pitfalls / stuff you wish you knew before?

  • elltee@lemmy.one
    link
    fedilink
    arrow-up
    4
    ·
    11 months ago

    Been daily for a while now, came over from Garuda, and a few other Arch derivative before that. NixOS is 99.9% fantastic. Lenovo carbon X1 Gen 6. Runs great. Newer custom build higher end desktop with AMD 7900RX GPU. Also runs great. I have a feeling it’ll run great on pretty much anything.

    The package store is amazing. The package store absolutely dwarfs the AUR. That being said, it seems a lot of the store packages are support / dependency packages that you wouldn’t install standalone.
    I always had a concern in the back of my mind with the AUR. Is the package trusted by multiple people?
    I’ve not had to rollback much, but it’s SUPER simple, and takes seconds for the most part. A reboot at the most.

    Things I wish I knew: I run declarative for everything, rather than imperative. Therefore, small changes are a tiny bit more of a hassle. Example: changing the hosts file. Rather than a quick hosts file edit and done, it’s a quick edit of the system configuration file, then a nixos-rebuild switch. Nearly any change is like this. (I’ve not moved to flakes yet.)

    if you have any shell scripts, and they’re hard-coded to the env: #!/bin/bash, #!/usr/bin/zsh, etc… you’ll need to port those over to #!/usr/bin/env

    appimages are well supported, but I ran into an issue where a custom appimage that someone else wrote won’t authenticate correctly because the browser isn’t included in the environment. I could t-shoot it more, but just too damn lazy to care.

    The local storage location for apps can get huge rather quickly, as each iteration/change is stored for rollback purposes. Make sure to setup a garbage collection schedule with whatever your comfortable with.

    Would i recommend? Depends on your patience and prior experience. NixOs is VERY VERY different than arch or pretty much any other distro, even other immutable ones. It takes a bit to get your head wrapped around it.

    I saw someone say start with Nix (the package manager) on your current distro, learn the ropes, add in pieces like Flakes and Home Manager as you learn. Learn the Nix language. And then move to NixOS. Probably good advice.

    I ignored all of that. Jumped in head first. Lots of frustration in the beginning. But now… I won’t be going back to a standard linux distro.

    Immutability makes me warm and fuzzy. Being absolutely sure that I can easily recover from a boneheaded mistake. Beautiful. Hard drive shits the bed? Drop in a new one, apply my configs, and I’m right back where I was within 30 minutes, complete with all data, apps installed and configured? Priceless.

  • monk@lemmy.unboiled.info
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    Of course. There’s just one pitfall: there’s no turning back, once you grasp it, the inferior ways of the past become unbearable.

  • K900@lemmy.0upti.me
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    User/maintainer here. I don’t think NixOS is for everyone, but if you’re the kind of person it’s for, you’ll be stuck with us forever. I would definitely recommend giving it a shot if the concept sounds appealing, and feel free to drop by the Matrix channels if you need any help figuring things out - documentation is currently not our strong suit, though people are working on it.

    • maiskanzler@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      11 months ago

      He, while we’re on the topic of documentation, if people want to help the effort, where should they look for a start? I am still new to Nix but love it so far and in the distant future I could see myself writing docs. Is there a place where people organize doc writing?

  • lloram239@feddit.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    First up, forget about install NixOS as a full distribution for the moment, instead just install the Nix packagemanager on your current system. That gives you like a quick&easy way to enjoy most of the benefits of NixOS without replacing what you already have up&running.

    As for things to note:

    • nix-command and flakes are the new way of doing things, but still not enabled by default, this can make some old documentation a bit confusing, as this update completely changes the CLI interface, just enable them and ignore everything that keeps taking about the old `nix-env"

    • you’ll be downloading a lot, NixOS has no binary compatibility for libraries, meaning, if a library changes, everything that depended on it changes as well, this can cause seemingly trivial updates to balloon into 30GB downloads

    • expect your installation to be bigger than usual, as upgrades will keep all the old software around, i.e. you can just boot into the previous version with a single click until you nix-collect-garbage -d all the old stuff, on systems with 32GB flash you have to be a bit careful to not run out of storage

    • no LTS releases, you’ll have to update every six months

    • almost no compatibility to third party software by default, /bin/sh and /usr/bin/env are the only thing it has in common with the normal FHS file system layout that everybody else is using, so expect every install.sh to fail, there are of course ways around it (e.g. buildFHSEnv), but they require some extra effort

    • all system configuration happens in /etc/nixos/, the rest of /etc is just read-only symlinks

    • .nix configuration file syntax is a lazy evaluated functional language, that looks somewhat similar to JSON, it’s quite a simple language, but not one that you can easily figure out just by looking at it (e.g. “:” defines a function, functions can only have one argument, everything else is done with currying), read the manual

    • https://search.nixos.org/options will be your best friend and nix repl followed by :l to tab-complete your way through the Nix structure

    Overall I am very happy with NixOS. Switching to NixOS was the first time in a decade that Linux started to be fun again. It comes with an enormous package collection. Building your own packages is trivial. It is possible to upgrade, downgrade or just run multiple versions in parallel, so no forced-upgrades as on other distributions. Also the Nix package manager can work as first-class build system, meaning git repositories can be treated as full packages (assuming they contain a flake.nix), packages by the distribution no longer have to exist as this weird appendage that has to exist independently from Upstream.

  • siph@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    I’ve been using NixOS for over a year and I can’t imagine using anything else. I originally started using it because I liked the idea of version controlling the entire configuration, but now I use it for everything.

    The most underrated feature of Nix is being able to instantly roll back an update that breaks something that you don’t want to deal with. An update breaks kitty or neovim? If I have something to do I can just roll back and fix it later. Awesome.

    It’s not for everyone. I can’t imagine someone who isn’t at least a hobbyist programmer having the desire to overcome the technical nature of it.

    Heres my config.

  • charje@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    I’ve been using Guix system for a couple years and am really liking it. I got a new computer and put popos on it for the seamless Nvidia drivers, but I still have guix package manager and Guix system on other computers.

  • pimeys@lemmy.nauk.io
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    11 months ago

    I’ve been running NixOS for the past four years in all my computers. It’s really, really the end game of Linux distributions for me. But it’s not for everybody. The Nix language can be a tough thing to learn, if you’re not a programmer and haven’t done anything with lazy functional languages before. It’s a dynamic language, with not super great documentation for practical things and missing a good language server that would let you to jump to definitions when learning how nixpkgs work and how to build things.

    Also, what I think is a serious problem, is how flakes are not yet enabled in the default installation. So first you learn with the basic template, and some helpful person comes talking about how great flakes are, and in a few weeks you might have written your own system flake finally and got it working. Flakes are really important to understand as soon as possible, because with them you get the lock file that gives you real reproducibility between computers and full control on which version of packages you get.

    But, when you learn all that, and get your company to go full-on with nix, having flakes in all projects, it’s the best programmer’s operating system out there. Here’s my config to steal stuff.

    • theshatterstone54@feddit.uk
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      I was just going through the README and I’m definitely stealing the idea chowning the /etc/nixos dir and symlinking it to $HOME/.config/nixpkgs. How did I not think of this myself?