Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot seem to get linkInputs, generateRegistryFromInputs to work #152

Closed
fboundp opened this issue Feb 14, 2025 · 1 comment
Closed

cannot seem to get linkInputs, generateRegistryFromInputs to work #152

fboundp opened this issue Feb 14, 2025 · 1 comment

Comments

@fboundp
Copy link

fboundp commented Feb 14, 2025

flake.nix:

{
  description = "System configuration";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    utils.url = "github:gytis-ivaskevicius/flake-utils-plus/master";
    darwin.url = "github:lnl7/nix-darwin/master";
    darwin.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = inputs@{ self, nixpkgs, darwin, utils }: utils.lib.mkFlake {
    inherit self inputs;
    nix.linkInputs = true;
    nix.generateRegistryFromInputs = true;
    hosts.test = {
      output = "darwinConfigurations";
      system = "aarch64-darwin";
      builder = darwin.lib.darwinSystem;
      modules = [
        { system.stateVersion = 6; }
      ];
    };
  };
}
% darwin-rebuild build -v --show-trace --flake .\#test
building the system configuration...
these 3 derivations will be built:
  /nix/store/r6fd03yvw2cc3lifnz13xh1771ldlifd-etc-registry.json.drv
  /nix/store/cvqscj5rhfaj9gxgn9qxx3aj81nw88bk-etc.drv
  /nix/store/wn7zydq62n5d3njbmp5ilha2x9f7yc37-darwin-system-25.05.a674621.drv
building '/nix/store/r6fd03yvw2cc3lifnz13xh1771ldlifd-etc-registry.json.drv'...
building '/nix/store/cvqscj5rhfaj9gxgn9qxx3aj81nw88bk-etc.drv'...
building '/nix/store/wn7zydq62n5d3njbmp5ilha2x9f7yc37-darwin-system-25.05.a674621.drv'...
% ls result/etc/nix
nix.conf@  registry.json@
% jq '.flakes|.[]|.from.id' result/etc/nix/registry.json
"nixpkgs"
"self"

I expected to see a result/etc/nix/inputs directory, and to see darwin and utils in the registry.

@fboundp
Copy link
Author

fboundp commented Feb 14, 2025

Oh, these are not intended as arguments for mkFlake. These are module options, so e.g:

      modules = [
        {
            nix.linkInputs = true;
            nix.generateRegistryFromInputs = true;
            system.stateVersion = 6;
        }
      ];

does the trick.

@fboundp fboundp closed this as completed Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant