Opinionated patchset (with recursive-nix planned!) for lix

Over the past few months, we (I and @NotAShelf) have maintained an opinionated patchset on top of lix, with the following changes:

  • Adding a default-flake nix setting (rejected in https://git.lix.systems/lix-project/lix/issues/502). Original credit to @dramforever, though we’ve made changes to fit the newer lix designs and also set nixpkgs as the default setting for default-flake (though it’s still configurable).
  • Adding a bit-shift builtin (useful for some PRNGs)
  • Adding a reject-flake-config setting to categorically reject all nixConfig in a flake. (This is distinct from the similar but more lenient setting accept-flake-config = false; in stock lix, as that setting actually permits some allegedly “safe” config through. We did not feel comfortable with that.)
  • Setting a custom version string (a little teehee uwu for the fans)
  • Silencing pointless warnings about unknown settings, especially since they break the NixOS module for nix. (See Lix: mismatch in feature name compared to nix - #3 by waffle8946 for the motivating example.)

Do note, we don’t have interest in maintaining an actual fork of lix at this time. Especially given how atrocious C++ is. We will be specifically maintaining patches on top of latest lix (as specified on nixos-unstable) and only that.

In light of

we’re now prepared to add recursive-nix to this patchset (once it’s removed upstream) until a viable replacement arrives.

If you’d like to use said patchset, take a look at our immortal nixpkgs fork (GitHub - feel-co/fp: nixpkgs, but make it emotional. · GitHub) which includes minimal other commits (primarily version bumps, as well as cherry-picked bugfix commits from nixpkgs PRs or master, since nixos-unstable gets broken somewhat frequently.).

The lix patches are listed in:

https://github.com/feel-co/fp/tree/feel-unstable/pkgs/tools/package-management/lix/2.92-patches

Happy lixing!

20 Likes

Awesome stuff! We are looking into the patchset to see what we can take back to decrease the work load for you all :slight_smile:.

(Unfortunately, not recursive-nix, we will leave it for you :stuck_out_tongue_winking_eye: but happy to know that folks are willing to provide it for others in the meantime!)

7 Likes

They are not pointless. They inform you, that the setting you set does not exist and is not effective. This can easily happen by doing a typo. I would recommend to set nix.settings conditional based on nix.package instead and not silence that warning.

1 Like

I don’t put nix in the config, I use it only in shells, usually to verify regressions. Hence patching out the warning is the only way to avoid warning spam on every lix invocation. (Of course nix in the shell will still throw warnings, but I use nix rarely so it doesn’t irk me in that case.)

I don’t make typos, generally I just copy the feature name directly from the code, hence to me the warnings are pointless. But as the patch is independent, you’re free to not use that patch :slight_smile:

After all, it’s called “opinionated” :slight_smile:

6 Likes