cjdns service: optionally add cjdns hosts to networking.extraHosts
Enabling this incurs a heavy eval-time cost, but it's a nice usability enhancement; satisfy both concerns by making it optional (default false).
This commit is contained in:
committed by
Joachim Fasting
parent
237af1853a
commit
bdb9cd1e17
@@ -195,6 +195,16 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
addExtraHosts = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to add cjdns peers with an associated hostname to
|
||||||
|
<filename>/etc/hosts</filename>. Beware that enabling this
|
||||||
|
incurs heavy eval-time costs.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -257,7 +267,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.extraHosts = cjdnsExtraHosts;
|
networking.extraHosts = mkIf cfg.addExtraHosts cjdnsExtraHosts;
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{ assertion = ( cfg.ETHInterface.bind != "" || cfg.UDPInterface.bind != "" || cfg.confFile != null );
|
{ assertion = ( cfg.ETHInterface.bind != "" || cfg.UDPInterface.bind != "" || cfg.confFile != null );
|
||||||
|
|||||||
Reference in New Issue
Block a user