hack: silence the warning about using hashedPasswordFile *and* initialPassword

see: <https://github.com/NixOS/nixpkgs/pull/287506>

i'll factor this into something more general, later
This commit is contained in:
Colin 2024-02-20 11:11:07 +00:00
parent 9e8e1d82a6
commit 902e351085
2 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,7 @@
./secrets.nix
./ssh.nix
./users
./warnings.nix
];
sane.nixcache.enable-trusted-keys = true;

13
hosts/common/warnings.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, ... }:
let
ignored = [
"The user 'colin' has multiple of the options\n`hashedPassword`, `password`, `hashedPasswordFile`, `initialPassword`\n& `initialHashedPassword` set to a non-null value.\nThe options silently discard others by the order of precedence\ngiven above which can lead to surprising results. To resolve this warning,\nset at most one of the options above to a non-`null` value.\n"
];
in
{
options = {
warnings = lib.mkOption {
apply = builtins.filter (w: !(builtins.elem w ignored));
};
};
}