summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-03-16 01:19:27 +0100
committertv <tv@krebsco.de>2016-03-16 01:19:27 +0100
commitfb82aa8f34977de004df09d9e76c506557235d15 (patch)
tree95f5bbc42746f4ab09fdd381118b33dd718d156f
parent1ff38bf6c69fd68cbf4e158a96cd8c97d6cf305d (diff)
krebs types.host.ssh.pubkeys: trace only own missing keys
-rw-r--r--krebs/4lib/types.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index 839a1a923..334a94c3a 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -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 {