Convert system flake from unstable to stable

I’m changing my config from unstable to stable with some unstable packages.

But my config uses a more recent version of I guess the nix-deamon

https://search.nixos.org/options?channel=unstable&query=nix.settings
Is available for unstable but not for 21.11

I tried adding nix-daemon to the unstable overlay. But it didn’t work…

    utils.lib.mkFlake {
      inherit self inputs;
      supportedSystems = ["x86_64-linux"];
      channels.nixpkgs = {
        input = nixpkgs;
        patches = map (patch: ./patches + "/${patch}") (builtins.filter (x: x != ".keep") (builtins.attrNames (builtins.readDir ./patches)));
        overlaysBuilder = channels: [
          nur.overlay
          (_: super: {
            inherit (channels.nixpkgs-unstable)
              nix-daemon
              ;
          })
        ];
      };
    };

What could I do to make it available again, without reverting the newer/future syntax?

Instead of nix.settings use the old style configuration.

This has nothing to do with the demon used. It has to do with the module used.

You should be able to use the newer version of the module using the technique described in NixOS - NixOS 21.11 manual, though be warned, it has been reported to not work reliably with flakes.

That technique works just fine with flakes, if you don’t use nixpath. Instead of <nixpks/….> use “${nixpkgs}/nixos/modules….” with nixpkgs being your flake input.

So far we always used modulePath rather than the flake. Thanks for the tip.