Skip to content

bug: "programs.git.iniContent.filter.lfs.clean' has conflicting definition values" #9384

@juk0de

Description

@juk0de

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I'm on nixos-unstable and after running nix flake update && nixos-rebuild boot this morning I got this error:

error: The option `home-manager.users.remrot.programs.git.iniContent.filter.lfs.clean' has conflicting definition values:
       - In `/nix/store/n9azfkx8l8qnkicsd4dg464zhah48w3a-source/modules/programs/git.nix': "git-lfs clean -- %f"
       - In `/nix/store/n9azfkx8l8qnkicsd4dg464zhah48w3a-source/modules/programs/git.nix': "/nix/store/6ljwpal7b1756708m33vj0crpral7mvl-git-lfs-3.7.1/bin/git-lfs clean -- %f"
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/remrot/git/nixos#nixosConfigurations."homer".config.system.build.toplevel' --no-link' returned non-zero exit status 1.

I haven't changed my git config in about a year. The git-lfs part looks like this:

  programs.git = {
    signing.format = "openpgp"; # default changed to 'null' in 25.05
    enable = true;
    lfs.enable = true;
    settings = {      
      include = {
        # import catppuccin theme file for 'delta'
        path = "~/.config/delta/catppuccin.gitconfig";
      };
      # set delta theme to 'catppuccin-macchiato'
      delta.features = "catppuccin-macchiato";
      filter = {
        "lfs" = {
          clean = "git-lfs clean -- %f";
          smudge = "git-lfs smudge -- %f";
          process = "git-lfs filter-process";
        };
      };
  [...]
}

Current (working) versions:

    "nixpkgs": {
      "locked": {
        "lastModified": 1778443072,
        "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    "home-manager": {
      "inputs": {
        "nixpkgs": [
          "agenix",
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1745494811,
        "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
        "owner": "nix-community",
        "repo": "home-manager",
        "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
        "type": "github"
      },
      "original": {
        "owner": "nix-community",
        "repo": "home-manager",
        "type": "github"
      }
    },
    "home-manager_2": {
      "inputs": {
        "nixpkgs": [
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1778905298,
        "narHash": "sha256-mqzr2uSY3TzBxnpFGocsT7fATE8tqU+eb0V+OhNR53I=",
        "owner": "nix-community",
        "repo": "home-manager",
        "rev": "92a8736142944ed3b2c4aba8b364583b6fda15a5",
        "type": "github"
      },
      "original": {
        "owner": "nix-community",
        "repo": "home-manager",
        "type": "github"
      }
    },

I don't know why there are 2 home-manager entries. I only import it once in flake.nix:

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    # home-manager
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    [...]
}

Maintainer CC

No response

System information

nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 7.0.5, NixOS, 26.05 (Yarara), 26.05.20260510.da5ad66`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.34.7`
 - nixpkgs: `/nix/store/vp1i814m5cqfzh22bl76s1k9bc8iikkv-source`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageIssues or feature request that have not been triaged yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions