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:
parent
9e8e1d82a6
commit
902e351085
|
@ -16,6 +16,7 @@
|
|||
./secrets.nix
|
||||
./ssh.nix
|
||||
./users
|
||||
./warnings.nix
|
||||
];
|
||||
|
||||
sane.nixcache.enable-trusted-keys = true;
|
||||
|
|
13
hosts/common/warnings.nix
Normal file
13
hosts/common/warnings.nix
Normal 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));
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user