krebs types.host.ssh.pubkeys: trace only own missing keys

This commit is contained in:
tv 2016-03-16 01:19:27 +01:00
parent 1ff38bf6c6
commit fb82aa8f34

View File

@ -6,7 +6,7 @@ with types;
let let
# Inherited attributes are used in submodules that have their own `config`. # Inherited attributes are used in submodules that have their own `config`.
inherit (config.krebs) users; inherit (config.krebs) build users;
in in
types // rec { types // rec {
@ -50,9 +50,9 @@ types // rec {
type = nullOr str; type = nullOr str;
default = null; default = null;
apply = x: apply = x:
if x != null optionalTrace (x == null && config.owner.name == build.user.name)
then x "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused."
else trace "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused." null; x;
}; };
ssh.privkey = mkOption { ssh.privkey = mkOption {
type = nullOr (submodule { type = nullOr (submodule {