E006: Duplicate Key
Severity: Warning
duplicate key `name` in binding set
The same key appears more than once in a let block or attribute set. Nix silently allows this (the last definition wins), but it is almost always a mistake.
Common causes
- Copy-paste error where a binding was duplicated.
- Two
inheritclauses pulling in the same name. - A large attrset where the same key was defined in different sections.
How to fix
- Remove the duplicate definition. The diagnostic points to the second occurrence and links to the first.
- If both definitions are intentional (rare), restructure the code so the intent is clear – e.g. use
//to explicitly override.