EmergentMind / nix-config

A continually evolving multi-user, multi-host NixOS configuration.
MIT License
272 stars 22 forks source link

Add warnings module and silence the ambiguous password warning #15

Closed DrymarchonShaun closed 3 days ago

DrymarchonShaun commented 5 days ago

Yet another pull request you may or may not want to merge. I finally decided this was annoying me enough to fix, this PR removes an evaluation warning that appears on every rebuild:

The user '${user.name}' has multiple of the options
        `hashedPassword`, `password`, `hashedPasswordFile`, `initialPassword`
        & `initialHashedPassword` set to a non-null value.
        The options silently discard others by the order of precedence
        given above which can lead to surprising results. To resolve this warning,
        set at most one of the options above to a non-`null` value.

Since this is intentionally done to make sure a backup password is set in the event that secrets don't work correctly, this warning really isn't needed. A recent PR in nixpkgs made this even worse, now it dumps the 'conflicting' values too, making it even longer.

EmergentMind commented 3 days ago

Nice, this has been bothering me as well. Ideally we should PR nixpkgs with an option to silence the output but this will do for now. Thanks!

DrymarchonShaun commented 3 days ago

Ideally we should PR nixpkgs with an option to silence the output but this will do for now.

Yeah, there is already some discussion about that in NixOS/nixpkgs#287506, but as far as I can tell it hasn't really gone anywhere.

luxus commented 3 days ago

yeah discussions in closed tickets are never going anywhere