1. 60

  2. 16

    This is a great release. I’ve been switching more and more of my personal repos over to flakes, and have been pretty happy with how they hang together. Hopefully flakes will make the shift from “niche folklore” to “well-understood by everyone” soon.

    1. 6

      Flakes are a killer feature. Classic Nix provides easy rollbacks and solves dependency hell, but git-tracked system definitions are next-level.

      I’m currently in the process of factoring my home system definitions to share a common repo. The DevOS project seems related but there are a lot of concepts to get up to speed on.

      1. 2

        You could already use git and nix quite easily, i just put nixpkgs as a git submodule for my home deployments.

    2. 9

      I’m one of the package maintainers of Nix for Arch Linux and it’s been a real headache getting this version to compile from source, beginning with the source tarball on the homepage returning a 404.

      There’s also 5 unspecified compulsory dependencies:

      • autoconf-archive
      • jq
      • libcpuid
      • gtest
      • lowdown

      And lowdown is patched in Nixpkgs, which adds another package that package maintainers have to juggle. The patches haven’t been accepted upstream either, which makes it difficult for me to justify including them in Arch Linux. What does lowdown even do anyway?

      I’ve spent a few hours today attempting to get this to compile, and it’s been one issue after the other.

      1. 7

        We no longer release source tarballs. If you want to build from source, please build from the tags in the Git repository.

        From the post.

        Looks like Lowdown might be used for the new documentation generation. Necessary for generating the man pages, I imagine.

        nixpkgs hacks up a lot of packages to enable dynamic linking but I don’t think that’s relevant to your Arch work. Just use the static version. Doesn’t matter.

        1. 4

          I use Arch Linux and am eagerly awaiting this working so I can upgrade to 2.4 with my normal arch package manager. Thank you for your service.

          1. 2

            I’ve managed to get it working, the blocker was generally just me being super tired and juggling multiple responsibilities!

            It’s been through the testing repository, and now in the community repository. 🎉

            1. 1

              Awesome, thanks!

          2. 3

            What’s the goal of a nix package in arch? I thought nix is pretty much self-managing / self-updating in its own environment. That would make the nix package more of a nuisance than useful.

            Or am I missing some use case where you’d want pacman managing it?

            1. 2

              All that linked lowdown patch does is help split up package outputs more finely, which is a Nixpkgs-specific thing. You can have hello.bin, hello.lib, hello.dev, hello.man, &c. Arch doesn’t concern itself with that when packaging.

            2. 3

              DAE know how to update from Nix 2.3 (macOS/single-install). The nix upgrade-nix doesn’t seem to upgrade beyond 2.3.16. Do I just run the new 2.4 install script; or is it assumed I’ll have to uninstall 2.3 first and then run the 2.4 install script?

              1. 3

                Does the upgrading page in the manual help? If not, I suspect 2.4 hasn’t hit the darwin channel yet (what channels are you using?).

                1. 3

                  I’m using nixpkgs https://nixos.org/channels/nixpkgs-unstable. The page didn’t help, but like you said - the update is probably yet to hit or something like that. If that all it is, I can def wait, thanks!

                  1. 4

                    It’ll take a bit for the new version to work it’s way through nixpkgs. Uninstalling is still a pain, so I’d say it’s only worth the hassle if you are blocked for any of the new features.

                    1. 4

                      Like the original commenter, I also can’t update from Nix 2.3 to Nix 2.4, on any of my systems (linux and macOS). It really doesn’t paint a good picture about the project that days after the announcement many still can’t update.

                      1. 1

                        I guess it is up to you how you see the picture, but I don’t see the problem, here.

                        Nix is a package manager, and nixpkgs is a massive package repository built atop it. IIUC upgrade-nix uses the latest stable nix, as declared in nixpkgs. For nixpkgs to change the stable version of Nix, it needs to make sure the package manager and the massive package repository are compatible (regardless of which must change to make it so).

                        Making it easy for general users to gleefully upgrade existing installs to a new version before ferreting out incompatibilities would be a little reckless.

                        That process did indeed catch at least one regression, so work is ongoing to iron it out.

                        You can always force the issue with nixUnstable, as noted in caius’ comment.

                        1. 1

                          The nixpkgs PR I linked before (https://github.com/NixOS/nixpkgs/pull/144197) merged a little bit ago, so the upgrade should be available via nix upgrade-nix now.

                      2. 4

                        I found sticking nix.package = pkgs.nixUnstable in my darwin-configuration.nix jumped it up to nix 2.5pre version. Was going to sit here until the 2.4 release had worked its way through as stable.

                        1. 1

                          The update has been merged into nixpkgs in the past hour, so the upgrade should be available via nix upgrade-nix now.

                          1. 2

                            And done. Appreciate you taking the time to let us know, thanks!