Some newbie-ish questions for rolling-release

Hi all

Some of these questions may be very noob-questions and I apologise but I am used to OpenSUSE Tumbleweed and Arch. I am trying to switch to NixOS as I love the idea of it but there are a few problems I keep encountering and I end up going back to OpenSUSE Tumbleweed. In no particular order:

  1. I would like a ‘rolling’ release which I believe would mean using the unstable branch. I already have this as part of my configuration script (I run it on a new install) but occasionally there is a breakage which means my system won’t build. In this kind of scenario, is it possible to switch the broken package back to the stable branch and keep the others on unstable?
  2. As above, I think flakes might be needed but I have no idea about how to use them, I already have various .nix config files (home.nix, printer.nix, mfc-j5340dw.nix (my printer), firewall.nix) do I have to convert all of them into flakes somehow? From what I understand about flakes (very little), they are used to ‘pin’ a package to a particular version (which I why I think they are needed to achieve point 1)
  3. I have found myself having to manually copy some fonts to ~/.config/fonts because they don’t seem to be available as installable packages. Is there a better way of doing this?
  4. I use KDE Plasma but have to manually configure the theme, cursor and various other settings for Dolphin, etc. Is there a better way of doing this than doing it manually every time I do a fresh install?
  5. Certain packages seem to take ages when rebuilding, I think MediaElch is the one that takes a while on my machine and I think because they are being built from source, is there a way to build it manually and submit it to the repo for others to be able to use or is there another way to speed it up?
  6. I occasionally have to manually install a package and run it from /opt but this doesn’t work on NixOS, is there an alternative to running another OS in a virtual machine? The package I use is just a .tar.gz that I unpack to /opt/ and then run. When I’m finished, I usually just delete it because it is used for testing.

Thanks in advance everyone, I really do like NixOS, it seems to be much snappier and I love the idea of booting from a ‘pure’ system i.e. no bits of packages hanging off here and there, no corrupted libraries that need a complete reinstall to fix.

  1. Just callPackage or overrideAttrs, using stable for one package isn’t necessary.
  2. Flakes are unnecessary (and irrelevant when it comes to your NixOS modules).
  3. Package them, then add them to fonts.packages via callPackage.
  4. There’s plasma-manager, ymmv.
  5. If you have a spare machine you can build remotely on said machine.
  6. Distrobox might be helpful.
2 Likes

Hi

Thanks very much for your quick response. I currently have a VM set up with NixOS installed on it. I will look into Plasma-Manager, thank you.

I’m afraid I don’t understand what callPackage is or overrideAttrs, after googling it, I can see that it is a way of calling a function but I’m afraid I still don’t understand how that fixes the package that won’t build. Could you please expand on that? Thanks again

In addition to @waffle8946 's comments:

Technically, yes, but I would generally recommend just waiting instead. Usually these things are fixed within a couple of days.

You can of course check GitHub to see if the issue is already known, and open an issue if not.

There is nothing you can do with flakes that you cannot without them.

This should only happen for one of exactly two reasons:

  • The package is proprietary
  • The package failed to build and nix reattempts it locally

In the former case there’s nothing we can do (we can’t redistribute proprietary software), in the latter case you can abort the rebuild and just wait a few days.

You might also be using a release- or -small branch, or straight-up master. If you use any of those you will often pull software that isn’t built yet.

This is very unlikely with channels though. Share your channels with sudo nix-channel --list.

In addition to what @waffle8946 says, you might be able to package it from source instead of using the tarball.

1 Like