···11+{ config, lib, ... }:
22+33+with lib;
44+55+let
66+ cfg = config.services.scion;
77+in
88+{
99+ options.services.scion = {
1010+ enable = mkEnableOption (lib.mdDoc "all of the scion components and services");
1111+ bypassBootstrapWarning = mkOption {
1212+ type = types.bool;
1313+ default = false;
1414+ description = lib.mdDoc ''
1515+ bypass Nix warning about SCION PKI bootstrapping
1616+ '';
1717+ };
1818+ };
1919+ config = mkIf cfg.enable {
2020+ services.scion = {
2121+ scion-dispatcher.enable = true;
2222+ scion-daemon.enable = true;
2323+ scion-router.enable = true;
2424+ scion-control.enable = true;
2525+ };
2626+ assertions = [
2727+ { assertion = cfg.bypassBootstrapWarning == true;
2828+ message = ''
2929+ SCION is a routing protocol and requires bootstrapping with a manual, imperative key signing ceremony. You may want to join an existing Isolation Domain (ISD) such as scionlab.org, or bootstrap your own. If you have completed and configured the public key infrastructure for SCION and are sure this process is complete, then add the following to your configuration:
3030+3131+ services.scion.bypassBootstrapWarning = true;
3232+3333+ refer to docs.scion.org for more information
3434+ '';
3535+ }
3636+ ];
3737+ };
3838+}
3939+
···11+This NixOS VM test implements the network topology outlined in https://github.com/scionproto/scion/blob/27983125bccac6b84d1f96f406853aab0e460405/doc/tutorials/deploy.rst#sample-scion-demo-topology, below is an excerpt from that document
22+33+Sample SCION Demo Topology
44+..........................
55+66+The topology of the ISD includes the inter-AS connections to neighboring ASes, and defines the underlay IP/UDP addresses of services and routers running in this AS. This is specified in topology files - this guide later explains how to configure these files. A following graphic depicts the topology on a high level.
77+88+.. figure:: https://github.com/scionproto/scion/raw/27983125bccac6b84d1f96f406853aab0e460405/doc/tutorials/deploy/SCION-deployment-guide.drawio.png
99+ :width: 95 %
1010+ :figwidth: 100 %
1111+1212+ *Figure 1 - Topology of the sample SCION demo environment. It consists of 1 ISD, 3 core ASes and 2 non-core ASes.*