Loading
nixos/users-groups: warn on ambiguous password settings
After 4b128008 it took me a while in a test setup to find out why `root` didn't have the password anymore I declared in my config. Because of that I got reminded how the order of preference works for the password options: hashedPassword > password > hashedPasswordFile If the user is new, initialPassword & initialHashedPassword are also relevant. Also, the override is silent in contrast to any other conflicting definition in NixOS. To make this less surprising I decided to warn in such a case - assertions would probably break too much that technically works as intended. Also removed the `initialHashedPassword` for `root`. This would cause a warning whenever you set something in your own config and a `!` is added automatically by `users-groups.pl`. `systemd-sysusers` also seems to implement these precedence rules, so having the warning for that case also seems useful.