News for hackers. Stuff that matters.
Re:NixOS 19.09 by Jeff_Brown on Wednesday October 09, 2019 @10:03PM (#21210195)
Two or three weeks ago I switched from Ubuntu to NixOS. I love it now -- but the first few days were rocky.

The first few times I installed it, once it was installed I could not connect to a network. Eventually I determined I could add these to `environment.systemPackages.pkgs`: ``` networkmanager plasma-nm ```

I also ran into a permissions issue -- when I migrated my data from Ubuntu I couldn't access most of it. I still have Ubuntu at work so I have to be able to move between the two. The solution was to discover that the default user id NixOS is 1001, whereas the default in Ubuntu is 1000. Adding this to config nearly solved that:

``` # User accounts. # Don't forget to set a password with ‘passwd’. users.users.jeff = { uid = 1000; # for compatibility with Ubuntu isNormalUser = true; extraGroups = [ "docker" "wheel" # for sudo "networkmanager" # for the plasma-nm widget, and # the privilege of changing settings (adding networks) "audio" ]; }; ```

I say nearly because NixOS won't let you change uid (at least via `configuration.nix`) for an existing user. I had to log in as root, delete the user, rebuild, reboot, then add the user with the options I needed, rebuild, and finally reboot again.

And between those two problems came the problem of trying to use MusNix as a channel (for apps to make music). I followed the instructions on MusNix's README.md and totally broke my system. I found an issue on MusNix's issue tracker with the same complaint, and the response was "are you using an old version of Nix?" But I was using 19.03, which at that time was the latest version. My system told me I had conflicting hardware configurations (some supposed-to-be-unique value was set in multiple places to distinct values), and it wouldn't let me rebuild until I fixed that, and I had no idea how, so I just reinstalled. (Later in that issue the solution seemed to be, "Don't use it as a channel, even though the README says you can.")

But each reinstall was much easier than the last, because (unlike Ubuntu or anything else I've ever used) you don't have to repeat the same set of actions each time. Instead your config script gets more complicated, and you just copy that into the new system, and it handles the rest.

There are still a few tweaks I do by hand, out of ignorance -- I set some KDE options manually, and ... hmm, maybe that's all. But I've read that even those can be copied from one system to another; they just require some digging, as they're scattered around rather than contained in a single place like you might expect.

There are no comments on this comment yet.