diff --git a/profiles/dn42-router/default.nix b/profiles/dn42-router/default.nix index 463e552..dc353ea 100644 --- a/profiles/dn42-router/default.nix +++ b/profiles/dn42-router/default.nix @@ -11,6 +11,9 @@ let bgp6Table = 2342; in { + imports = [ + ./documentation.nix + ]; options.profiles.clerie.dn42-router = { enable = mkEnableOption "DN42 router base config"; @@ -93,6 +96,10 @@ in { type = types.str; default = ""; }; + htmlDocumentation = mkOption { + type = types.str; + description = "This option is set by the module itself and contains the documentation for this router setup"; + }; }; config = mkIf config.profiles.clerie.dn42-router.enable { diff --git a/profiles/dn42-router/documentation.nix b/profiles/dn42-router/documentation.nix new file mode 100644 index 0000000..b8fea65 --- /dev/null +++ b/profiles/dn42-router/documentation.nix @@ -0,0 +1,88 @@ +{ config, lib, ... }: + +with lib; + +let + + cfg = config.profiles.clerie.dn42-router; + +in { + + profiles.clerie.dn42-router.htmlDocumentation = '' + + +
+ + +This is a router in the experimental decentralized network dn42.
+ +If you like to peer, please drop me an email to dn42@clerie.de.
+ +Happy peering!
+ +AS4242422574${cfg.loopbackIp}${cfg.routerId}| ${peer.peerName} | +AS${peer.remoteAsn} | +
+
+
+ Peering config+
|
+ [Map] | +
| ${peer.peerName} | +AS${peer.remoteAsn} | +
+
+
+ Peering config+
|
+ [Map] | +