Skip to content

[flake-parts] Use git-hooks as non-flake input #527

Open
@srid

Description

@srid

The flake-parts template currently suggests using it as a flake input:

git-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
git-hooks-nix.url = "github:cachix/git-hooks.nix";

This brings in a bunch of transitive inputs that the user does not strictly need, forcing setting up of follows like:

    git-hooks.inputs = {
      nixpkgs.follows = "nixpkgs";
      nixpkgs-stable.follows = "nixpkgs";
    };
    gitignore.follows = "git-hooks/gitignore";
    gitignore.inputs.nixpkgs.follows = "nixpkgs";
    gitignore.inputs.flake-compat = { };

Therefore, should we just change the template to reference git-hooks as a non-flake input? viz.:

    git-hooks.url = "github:cachix/git-hooks.nix";
    git-hooks.flake = false;

    ...

    # In imports
    (inputs.git-hooks + /flake-module.nix)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions