I just upgraded my NixOS machine after switching to nixos-unstable-small because I think unstable will take some time to update as getting 24.11 out has the highest priority.

Anyhow, two of my packages stopped me from applying a new configuration, as some packages have been changed when reorganizing into pkgs/by-name. I fixed it and wanted to share as this will hit others running unstable with these packages as soon as hydra catches up.

nerdfonts (now nerd-fonts)

Package was renamed, which it will state on evaluation; individual fonts are now part of the nerd-fonts attribute. I had Source Code Pro in there, there was some kind of mapping, which looked kind of like in https://wiki.nixos.org/wiki/Fonts#Installing_specific_fonts_from_nerdfonts – the new way is now to just use nerd-fonts.sauce-code-pro directly, you can probably do something like ++ with nerd-fonts; [ sauce-code-pro other-fonts ] to add multiple nerd-fonts to your fonts list, but I haven’t tested this.

RetroArch

Until now, cores were specified as in https://wiki.nixos.org/wiki/RetroArch, however override doesn’t seem to work anymore. There’s now the withCores attribute / function that expects a function that returns a list. The easiest way I found to just specify a fixed list of cores was (retroarch.withCores (_: with libretro; [ snes9x mupen64plus fbneo flycast ])). Maybe other options are easier / cleaner.

Word of warning on compiling nixos-unstable-small

There are currently a lot of packages to be built if you change into that channel (I’m using flakes, but you get my point). Due to the default value of auto for nix.settings.max-jobs, this meant nix tried to build 24 derivations at the same time. This is fine if these are just downloaded from hydra, but if you try to build 24 big derivations at the same time, each trying to use 24 threads because nix.settings.cores is also 0 by default, which means all threads, build processes quickly ate all of my 32GB of RAM so that the OOM killer had to intervene, however often too late with my system dying. I recommend to set nix.settings.max-jobs to something more reasonable before attempting this (I used 1).

  • iamkexo@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    16 days ago

    First of all, thank you for the informative post. I have been using nixos unstable for some time now but I have never heard of unstable-small, could you give a brief explanation?

    p.s: The new changes to the nerdfonts packages are really useful for me I’m glad to known beforehand.

    • Laser@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      16 days ago

      nixos-unstable{,-small} are both rolling NixOS channels. The difference between them are the requirements for updates. Both need a specific set of packages to build successful and pass the tests on hydra, the central build server. The jobset for nixos-unstable is https://hydra.nixos.org/jobset/nixos/trunk-combined if I’m not mistaken; nixos-unstable-small is https://hydra.nixos.org/jobset/nixos/unstable-small. Small, as the name implies, has a smaller jobset.

      That’s also the reason I had to rebuild so many packages: while unstable provides most (I think all redistributable ones), nixos-unstable-small only builds a subset of packages like the kernel, coreutils etc (I don’t actually know what constitutes it exactly); and the packages it didn’t build, you can’t download, which means if you have others installed, you need to build them yourself. It happen automatically, NixOS is a source-based distribution after all and binary packages are just substitutions, but this was a bit of a pitfall.

      Edit: By the way, to get the new names of the fonts I did something like this:

      $ nix repl
      nix-repl> :l <nixpkgs>
      nix-repl> nerd-fonts.
      

      Don’t hit enter after the dot, but rather press TAB to make the REPL show you the available packages inside that set. The nix-repl> doesn’t need to be entered, just signifies that this is no longer in your normal shell, but inside the REPL.

      • iamkexo@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        16 days ago

        Oh wow, thank you for the detailed explanation. For me using the usual nixos-unstable makes much more sense as I don’t need the most up to date packages as soon as they are released, and I am more than willing to wait for the hydra central server to compile the packages and for me to just download the cached binaries(my computer is not very fast, honestly). I did not think about using nix repl to get the new nerd-fonts package names, but the ones I was using apparently had no changes naming-wise, so I had no problems.

        • Laser@feddit.orgOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          16 days ago

          You will only see the changes after your <nixpkgs> has been updated (which for you is still the nixpkgs state of a week ago), so not right now. Or maybe this option was always there? I don’t know and I’m tired. Anyhow, when unstable gets updated and your evaluation complains not finding the package, you know where to look ;)