I’ve been added to NUR!

So, in order for the title of my blog to make any sense, I’ve got to explain a few things to folks that are not involved in the NixOS space.

To understand NUR, you have to understand NixOS and Nix.

What is Nix?

Nix is a functional package manager that operates differently than most other package managers, and something I’ve talked about in the past. In brief, Nix is a language agnostic package manager that relies on a functional programming language, also called Nix, to declare how packages are built within a fully isolated environment. Each package that is built is put into the Nix Store, which is essentially a hashmap of directories in a read-only filesystem, with the SHA256 of directory contents as the hash function.

What is NixOS?

NixOS is a GNU/Linux OS that builds on top of Nix. In NixOS, all of your packages AND system configuration files live in the Nix Store, and are symlinked into the mutable part of the filesystem. The system is configured with the Nix language, and a large collection of packages and configuration modules live in Nixpkgs, which is a collection of Nix language files that define how NixOS is configured by default, and all the possible configurations that you can activate in the system. As of writing, there are 8532 different options that are available to NixOS users.

For example, if you wanted to donate your idle compute cycles to BOINC, in a normal GNU/Linux OS, you have to install BOINC with a package manager, then enter other commands in order to enable the service. With NixOS, it’s a single line of code to enable, and then you get 4 additional options to refine your service specification. Pretty neat, right?

What is NUR?

So, the standard Nixpkgs has all of those options, and that is great. However, one feature that Nixpkgs does not support is community packages, that is, third-party sources of packages that come from independent packagers. Community packages are great because it allows individuals to contribute to the overall ecosystem without interacting with the standard repository. I’m not saying that the standard package repository is bad! What I’m saying is, because the standard package repo is run by volunteers, they cannot service every need that the larger community has. And not every volunteer is able to participate within the standard packaging organization.

Enter NUR, the Nix User Repository. As of right now, it is implemented as a package overlay over Nixpkgs. What that means is, that the Nixpkgs is extended, and NUR packages are added in. That way, the interface to add a NUR package is exactly the same as adding a standard package. So in this way, it is slightly simpler than adding AUR packages in Arch. Since the packages are put into their own namespace, this makes the distinction between official and unofficial somewhat obvious, but not as obvious as with AUR.

I’ve been added to NUR

So, in order to be apart of the community repository, I followed the instructions on the NUR homepage. My personal NUR is at https://github.com/sehqlr/nur-packages.

What’s really cool about NUR in particular is that I can now store my NixOS configurations in that same repo, and my home-manger config as well. Now, I can keep the majority of my configurations within my NUR, import them alongside any local config (and secret config), and done! All of the portable parts of my config rest within my NUR, and if anyone could benefit from it, they can import whichever pieces they need, as long as I keep them properly organized, of course.

One problem

So, now I have a problem: can I make any packages that are actually useful to anyone else besides me?

So far I’ve tried to package up Gridcoin-Research, tuxemon, and upwork-desktop to no avail.

What do you think I could package up? Leave a comment here or create an issue on my NUR!

Published by sehqlr

I'm a multipotentialite Millenial from St. Louis, MO. My day job is freelance web development and DevOps, but in a previous life, I was an English major. I'm on the STL Tech Slack, GitHub, Keybase, and Twitter, under the @sehqlr handle. (It's pronounced "secular" like the world-view.) I'm also on Mastodon as @sehqlr@weirder.earth.

One thought on “I’ve been added to NUR!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: