comma icon indicating copy to clipboard operation
comma copied to clipboard

Allow to provide an `--inputs-from` argument when using flakes

Open madjar opened this issue 3 years ago • 1 comments

This allows pinning the nixpkgs to use when there exist a flake for the current system (for example when using home-manager).

I realized it would be useful to me to reuse my home-manager config's nixpkgs instead of downloading a new one anytime the cache expires.

My rust is not in top shape, so I'm definitely open to comments on the style of the code (or in fixes, if you have some in mind).

madjar avatar Aug 30 '22 13:08 madjar

That sounds like a good idea, but I'm not aware of ways to use flakes as channels. Do you have something specific in mind?

madjar avatar Aug 31 '22 11:08 madjar

This allows pinning the nixpkgs to use when there exist a flake for the current system (for example when using home-manager).

I realized it would be useful to me to reuse my home-manager config's nixpkgs instead of downloading a new one anytime the cache expires.

this is already possible with

  nix = {
    registry = {
      nixpkgs.flake = { outPath = lib.cleanSource "${pkgs.path}"; };
    };
  };

in nixos and home-manager https://nix-community.github.io/home-manager/options.html#opt-nix.registry

Artturin avatar Nov 20 '22 16:11 Artturin