21 votes

Has anyone ever used NixOS as daily-drive distro?

I'm impressed by reproducibility of NixOS, configuration mechanism and Nix package manager, but how it would be in daily-drive use? Is it worth it?

23 comments

  1. [9]
    donn
    Link
    Still do (and nix-darwin on Macs). It's not for the faint of heart, I can tell you that much. The documentation situation really leaves much to be desired and because of the declarative nature...

    Still do (and nix-darwin on Macs).

    It's not for the faint of heart, I can tell you that much. The documentation situation really leaves much to be desired and because of the declarative nature thereof, an update to libraries with a ton of dependents such as glibc requires you to re-download pretty much everything.

    On the other hand, me setting up a new computer (or setting up the same computer from a wipe) is now more or less:

    git clone <my nix config repo> nix-conf
    sudo nixos-rebuild switch --flake ./nix-conf
    

    And then I have pretty much everything set up the way I need it to, on macOS that's my terminal environment taken care of, on Linux, everything from the specific version of Nvidia drivers for my desktop to my firewall rules to the daemon that configures my Logitech mouse are all set up. It took effort to get there, but once you're there, it's like a magic trick.

    11 votes
    1. [2]
      yukawa0
      Link Parent
      Appreciate you! That feature of NixOS is what makes me think about migration to it. Beside that, how did you learn NixOS? Can you share some useful resources or give an advice? Thank you!

      Appreciate you! That feature of NixOS is what makes me think about migration to it. Beside that, how did you learn NixOS? Can you share some useful resources or give an advice?

      Thank you!

      4 votes
      1. donn
        Link Parent
        Argh, I typed up a reply but forgot to post it. For me it was a lot of googling and a lot of trial and error so my approach is not recommended. I recommend going through Zero-to-Nix on your...

        Argh, I typed up a reply but forgot to post it.

        For me it was a lot of googling and a lot of trial and error so my approach is not recommended.

        I recommend going through Zero-to-Nix on your current Linux distro then if you like what you see, install NixOS.

        Your operating system config file is going to be at /etc/nixos/configuration.nix -- you can start messing with it immediately (and if you break something, Nix will allow you to roll-back to a previous system, so it's relatively risk-free.) You can learn more about NixOS config files at https://zero-to-nix.com/concepts/nixos.

        4 votes
    2. [3]
      Greg
      Link Parent
      Is this a human effort issue, or just bandwidth/compute? I've been vaguely thinking of testing it out as a more bare-metal alternative to Docker, and I wouldn't be worried about leaving the...

      an update to libraries with a ton of dependents such as glibc requires you to re-download pretty much everything

      Is this a human effort issue, or just bandwidth/compute? I've been vaguely thinking of testing it out as a more bare-metal alternative to Docker, and I wouldn't be worried about leaving the machine to do its thing for a little longer while updating, but I know myself well enough to know that if there's extra manual overhead as well I'm likely to postpone updating things at all for longer than I should!

      That's a big part of why I'm interested in it in the first place, to be honest: my baseline Ubuntu installs always pick up so many ad hoc package installations and config changes and TODO: come back and sort out this mess notes when I'm on a tight deadline and just need something to work that I'd rather put in the effort up front for a system that keeps things organised by default. My main concern would be whether imposing that organisation adds overhead that discourages changes later?

      1 vote
      1. zefrof
        Link Parent
        In my experience it’s a bandwidth/compute “issue.” I put issue in quotes because my internet speeds are quick. I’ve also setup automatic updates which are amazing. Unless you’ve made unusual...

        In my experience it’s a bandwidth/compute “issue.” I put issue in quotes because my internet speeds are quick. I’ve also setup automatic updates which are amazing. Unless you’ve made unusual customizations to packages like glic updates will simply consist of downloading binaries.

        2 votes
      2. donn
        Link Parent
        yeah, bandwidth. it's a non-issue for some people but a rebuild of most packages for me is a 14GiB download which isn't instant

        yeah, bandwidth. it's a non-issue for some people but a rebuild of most packages for me is a 14GiB download which isn't instant

        1 vote
    3. [3]
      Daedalus_1
      Link Parent
      That's super nice, but I guess it's more a tinkering thing? I mean, I switch laptop every 5 years, so for me setting up a new computer isn't something I do often. And I'd guess the time spent on...

      That's super nice, but I guess it's more a tinkering thing? I mean, I switch laptop every 5 years, so for me setting up a new computer isn't something I do often. And I'd guess the time spent on figuring out things in NixOS is greater then me just re-installing everything on my new laptop in 1 day. In case of laptop failure, well I do have a full system backup which does incremental backups every week.

      1 vote
      1. donn
        Link Parent
        Not really, no. Having to hunt down and/or remember every single tiny config I do to get weird USB devices working/the screen to stop flickering/etc, sometimes even when I just update my computer...

        Not really, no. Having to hunt down and/or remember every single tiny config I do to get weird USB devices working/the screen to stop flickering/etc, sometimes even when I just update my computer and not reinstall a distro turned me off of daily-driving Linux in the first place. Nix takes that mental load off.

        2 votes
      2. bme
        Link Parent
        This depends on entirely how you use your computer. Do you mostly use things out-of-the-box? If so, I'd agree, this probably doesn't sound particularly strong. If you take the "system-crafter"...

        This depends on entirely how you use your computer. Do you mostly use things out-of-the-box? If so, I'd agree, this probably doesn't sound particularly strong. If you take the "system-crafter" approach of investing in customisation with the long view in mind you might accumulate much more state. I run various bits of nix on all of the computers I use, and it is far far far far cheaper to replicate a few kb of text than gigabytes of full system backup. I also use nix for work, so if I get issued a new corp laptop I spend zero time setting it up.

        If you are a dev then it gets even more compelling in terms of reproducing evironments sharing scripts / packages across operating systems etc. If you don't have any problems it solves then it's probably just niche for niche's sake, but I'd say anyone that uses a computer for long enough will one day wish they had a succinct way of capturing the essence of the state of their computer without the attendent cruft. Nix is that.

        1 vote
  2. Nihilego
    Link
    I have sort of used it as a daily driver during Uni on a shitty corebooted Chromebook. With i3wm and a Celery processor, It runs day to day fine. Nix-build though may take a fairly long time to...

    I have sort of used it as a daily driver during Uni on a shitty corebooted Chromebook. With i3wm and a Celery processor, It runs day to day fine.
    Nix-build though may take a fairly long time to finish.
    It is not a distro I recommend honestly based on my use cases(More for desktop, I don’t develop or need to rebuild multiple machines)
    But I stick with for some of its features
    Generational builds, never running into dependency hell, atomicity and reproducibility(which is also a negative point).

    I don’t use it for gaming or as a main machine fwiw, but I tried to run a game from gog that has a native Linux version and I still can’t run it, nix-ld and some weird things need to be done first.
    Documentations are kind of poopoo, I tend to rely on old blog posts or other things to configure things like syncthing and kde connect(though usually you only need to do them once anyway).

    That’s sort of my stance about it as “Someone that knows how to use computers a good amount but isn’t a programmer”.

    7 votes
  3. [2]
    eggy
    (edited )
    Link
    Yes! I have started it using it this past summer, with relatively no programming background. It is a lot of upfront time for long term payoff which is why i decided to learn it. In terms of...

    Yes! I have started it using it this past summer, with relatively no programming background. It is a lot of upfront time for long term payoff which is why i decided to learn it. In terms of resources I highly highly recommend videos by Vimjoyer on youtube, ill link some of the main ones I found helpful. I also joined his discord, and the people on there are super super helpful. Like I said I am not a programmer by any any means but through their help I feel way more confident about nixos, and I use hyprland, home-manager, and flakes so there was a lot of new learning on my end.

    My tip is to use flakes, I can't really tell you what they are beyond ensuring youre pulling from a specific source, but I think they probably make more sense if you are a programmer of some sort

    this is a useful flakes guide
    this is his ultimate guide and it is I think what i followed most in getting setup
    And again his channel in general covers just about everything you need to get started. Fwiw I really like hyprland so if you're up for the challenge i say go for it! There are a lot of helpful resources on the channel, and in his discord!

    In terms of packages I recommend using Search.nixos.org to search for things!

    5 votes
    1. eggy
      (edited )
      Link Parent
      Oh another tip I have is to move your nixos config, I have mine in ~/Documents/nix which is also tracked by git! The only thing you need to change in your command is just specify a path, so for me...

      Oh another tip I have is to move your nixos config, I have mine in ~/Documents/nix which is also tracked by git! The only thing you need to change in your command is just specify a path, so for me the command is nixos-rebuild switch --flake ~/Documents/nix (also sidenote I would alias this, I have mine set to rebuild-nix)

      You are welcome to explore my git repo located here (I know it says i don't know what I am doing, but everything works quite well, and I tried to comment stuff as much as possible)! and feel free to ask if you have any questions! I really like nixos, and it was definitely worth the effort to learn! I run it on my desktop, and my laptop which you can see in my config, I have two directories in the host directory.

      2 votes
  4. [3]
    DataWraith
    Link
    I ran NixOS and home-manager on all my machines for about a year using flakes and deploy-rs. The upsides were nice: NixOS is among the largest package repositories, so what you want to install is...

    I ran NixOS and home-manager on all my machines for about a year using flakes and deploy-rs.

    The upsides were nice:

    • NixOS is among the largest package repositories, so what you want to install is likely available already, and it often takes just a single flag to install something with a sane base configuration.

      This is especially nice for self-hosted stuff (e.g. an RSS reader). Instead of messing with Docker containers (though you can do that too), you just flip a flag, and it installs postgres and whatever other dependencies are needed.

    • Configuration can be versioned with git and is mostly shareable between machines, so you can have the same shell configuration and whatnot even when SSHing into a server, and deploying the configuration to said server is trivial with deploy-rs.

    However, compatibility was a big problem for me:

    • CUDA and PyTorch and, really, anything involving the GPU was a PITA to get working and would break once in a while for non-obvious reasons.
    • Installing software that is not yet packaged is a bit arcane. I've had a lot of trouble with third-party python packages in particular, which sometimes resulted in hours of wasted effort before I gave up.
    • NixOS doesn't adhere to the FHS standard, so third-party software will usually not work, or only work after a lot of trial and error. This includes projects that are packaged as AppImage, which normally runs everywhere because it includes all dependencies.

    I've migrated off of NixOS a few months ago and switched to Bluefin, which is an immutable distribution based on Fedora Silverblue, and I'm very happy with that decision.

    Just like NixOS, the system root is immutable, and it automatically updates to new versions in the background using OSTree. Almost all apps I need are available via homebrew or Flatpaks, everything else is either distributed as an AppImage -- that just works --, or in the usual way (e.g. Python pip), and if something is really missing, distrobox can run packages from other distributions in containers, though I haven't needed to do that so far.

    While I can't speak of the long term yet, so far the distro has been rock-solid. Easily the least problems I've ever had with a Linux installation -- less trouble than Ubuntu, even Debian and god-forbid Arch; it just works.

    3 votes
    1. [2]
      zefrof
      Link Parent
      For future reference or anyone having issues with Appimage on NixOS. Install appimage-run. Then you can appimage-run my-appimage from the terminal. In my experience that solves the vast majority...

      For future reference or anyone having issues with Appimage on NixOS. Install appimage-run. Then you can appimage-run my-appimage from the terminal. In my experience that solves the vast majority of appimage problems.

      1 vote
      1. DataWraith
        Link Parent
        I considered mentioning appimage-run but the comment was long as it was. It didn't work for me, as the software I wanted to run with it (pCloud) was using libFUSE and that was broken with...

        I considered mentioning appimage-run but the comment was long as it was.

        It didn't work for me, as the software I wanted to run with it (pCloud) was using libFUSE and that was broken with appimage-run. I spent quite a bit of time trying to fix that. pCloud is also packaged in NixOS, but (used to be?) in a permanently broken state.

  5. zefrof
    (edited )
    Link
    I’ve been daily driving NixOS for a few years now. My suggestion for new users is use flakes. I find they make channel[1] management, using libraries, and managing multiple systems much easier....

    I’ve been daily driving NixOS for a few years now. My suggestion for new users is use flakes. I find they make channel[1] management, using libraries, and managing multiple systems much easier. It’s also worth picking up home manager sooner rather than later.

    I disagree with the common sentiment that Nix documentation sucks. It has sharp edges, but being able to copy paste config from the wiki or manual is way nicer than following a 30 step guide. The Nix organization has been making progress on improving documentation too (ex. the wiki is official now, rather than community ran).

    As mentioned elsewhere, search.nixos.org is great for finding packages, BUT it’s also awesome for finding configuration options. For example search for pipewire to see all its config options.

    Other people’s configurations are also a great learning resource. Copy paste different configs and see what they do. You can always rollback if you don’t like the changes.

    [1] channels are roughly equivalent to Ubuntu versions (22.04, 23.10, 24.04, etc)

    2 votes
  6. drannex
    Link
    Yes, and it was a glorious nightmare. NixOS is fantastic, but temperamental and absolutely taxing on the mind to set up properly. I never used flakes, but everyone says you should, some suggest...

    Yes, and it was a glorious nightmare. NixOS is fantastic, but temperamental and absolutely taxing on the mind to set up properly. I never used flakes, but everyone says you should, some suggest "newbs" should use it, others strongly suggest against it. Use flakes.

    I would 95% suggest daily driving it. I still prefer just running Arch1(through EndeavorOS, the "modern" Antegros), but running it with toolbx on the inside. That way I can spin up "mini-archs" in containers that are entirely mutable, but configurations can be exported to be rebuilt (like a NixOS Configuration), and "if things go wrong, it’s easy to throw a toolbox away and start again", I have atleast 15 running all with different configurations and different distros (AUR, and DNF, and APT on one system???)

    A good article other than the official link is, as usual, on the Arch Wiki. You can set it up with Nix or any other distro, but Arch is just a love of mine 1.


    1. My fourth computer love of all time.

    1 vote
  7. [2]
    vildravn
    Link
    I have been using NixOS as a daily driver for a bit over 6 months now, I used a lot of other distros in the past from the more vanilla Ubuntu, through Arch to some of the more different ones like...

    I have been using NixOS as a daily driver for a bit over 6 months now, I used a lot of other distros in the past from the more vanilla Ubuntu, through Arch to some of the more different ones like Fedora Silverblue.

    A coworker told me about it and linked the NixOS: Everything Everywhere All At Once video by No Boilerplate and also the aforementioned Vimjoyer and I fell in love with the idea.

    I use it for everything: Browsing the internet, gaming, and some coding - mostly Python and some C++. I actually cheat a bit due to how special some of my things are. I really like a lot of the concepts NixOS has, but I don't really have the time of day to learn all these new paradigms so I have some pet containers with Distrobox.

    All-in-all, if you do more than just some basic stuff (and I would include gaming on Steam under basic stuff) there is some learning curve to it and it can be quite daunting. One more thing that I think I would recommend, aside from the things others have recommended, and it's a habit I picked up while using Silverblue, would be using Flatpaks. They get you far and are hassle-free.

    I have been thinking about this recently and definitely have been annoyed at some of the sharper edges, especially when it comes to programming or running programs that aren't in the Nix or Flatpak repositories.

    I love NixOS, and I am probably going to switch to something more "vanilla" again.

    1 vote
    1. eggy
      Link Parent
      Second the video! It was what got me hooked on nixos!

      Second the video! It was what got me hooked on nixos!

  8. knocklessmonster
    (edited )
    Link
    I tried for six months and couldn't get into it for a couple of reasons: I wasn't using advanced tooling like nix-home and nix-flakes. These would've made life easier from a deployment/maintenance...

    I tried for six months and couldn't get into it for a couple of reasons:

    1. I wasn't using advanced tooling like nix-home and nix-flakes. These would've made life easier from a deployment/maintenance standpoint. Integration with Plasma wasn't quite there, though, so I didn't use nix-home until I tried using nix on other distros.

    2. ad-hoc binary apps: You either need to write your own configs for these or find somebody who did, or get Distrobox set up. I couldn't get Distrobox set up two years ago, so this was a bit harder for me.

    I wanted an immutable, adjustable system which is not what Nix is intended to provide. Nix is intended to provide a declarative system first and foremost, which it is brilliant at. I enjoyed learning it, am happy I did so, and is an absolutely amazing system.

    I moved to Aurora, with a custom image to add packages, Distrobox where other distros (mostly Arch) has packages/tooling that works for me, Flatpak, and WINE for everything else.

    1 vote
  9. truxnell
    Link
    Yep, I daily drive it here, and it's what my entire homelab runs on. I went to nixos as an alternative to my overcomplicated K8s homelab, and nix fills the gap nicely, everything just works once...

    Yep, I daily drive it here, and it's what my entire homelab runs on.
    I went to nixos as an alternative to my overcomplicated K8s homelab, and nix fills the gap nicely, everything just works once setup.

    1 vote
  10. pete_the_paper_boat
    Link
    I've used it for over two years during my study, and currently still use it for WSL. It's probably the most relaxing way to use Linux imo. All of the setup and removal is handled for you behind...

    I've used it for over two years during my study, and currently still use it for WSL.

    It's probably the most relaxing way to use Linux imo. All of the setup and removal is handled for you behind the config.

  11. Arshan
    Link
    I've used it on my main desktop and laptop for ~5 years. Pros: Real easy to try things out; (Comma)[https://github.com/nix-community/comma] lets you just type , <package> in your shell to run a...

    I've used it on my main desktop and laptop for ~5 years.
    Pros:

    • Real easy to try things out; (Comma)[https://github.com/nix-community/comma] lets you just type , <package> in your shell to run a package
    • Generally very up-to-date packages with a massive range of packages
    • One config for everything
    • Very easy to configure multiple computers to be identical or different as you need
      Cons:
    • If you go off the happy path, you're really on your own. This is true for most Linux distros, but with Nixos you get an additional weirdness point.
    • The Nix language is kinda weird, and I don't mean as a pure functional language. My brain separates config languages and programming languages into different categories and nix the language is a fusion of them.
    • The project itself is in a odd state with flakes and theirs been some kerfuffles with maintainers. I don't know details just that theirs been some conflict.
    • Related to the above, nix flakes have been in experimental for years and I don't think their coming out soon.

    I've used it daily and I honestly don't have many serious critiques with the tech.