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