Skip to content

Support arbitrary fetching of files as Flake inputs #5979

@MatthewCroughan

Description

@MatthewCroughan

Is your feature request related to a problem? Please describe.
I want to make a flake that fetches people's keys from Github. It looks like this, but I cannot because fetching arbitrary files is not supported via flake inputs:

{
  inputs.matthewcroughanKeys = {
    url = "https://github.com/matthewcroughan.keys";
    flake = false;
  };
  outputs = { self, matthewcroughanKeys }: {
    myKey = matthewcroughanKeys.outPath;
  };
}

Describe the solution you'd like
I want flake inputs to support fetching arbitrary files and locking their hash in the flake.lock

Describe alternatives you've considered
Using a sha256 rather than nix flake update to manually fetch keys, maintaining a long list of sha256s for each person. Or aggregating the hashes of many keys in a set of fetchurl calls.

Additional context
https://discourse.nixos.org/t/fetching-ssh-public-keys/12076

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions