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:
@@ -16,6 +16,7 @@
|
|||||||
./secrets.nix
|
./secrets.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./users
|
./users
|
||||||
|
./warnings.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sane.nixcache.enable-trusted-keys = true;
|
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));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user