about summary refs log tree commit diff
path: root/nixos/modules/services/networking/scion/scion.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/networking/scion/scion.nix')
-rw-r--r--nixos/modules/services/networking/scion/scion.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/scion/scion.nix b/nixos/modules/services/networking/scion/scion.nix
index b8bfef8b93b58..efab97f7cd8da 100644
--- a/nixos/modules/services/networking/scion/scion.nix
+++ b/nixos/modules/services/networking/scion/scion.nix
@@ -8,6 +8,23 @@ in
 {
   options.services.scion = {
     enable = mkEnableOption "all of the scion components and services";
+    package = mkPackageOption pkgs "scion" { };
+    stateless = mkOption {
+      type = types.bool;
+      default = true;
+      description = ''
+        Setting this value to false (stateful) can lead to improved caching and
+        performance.
+
+        This option decides whether to persist the SCION path sqlite databases
+        on disk or not. Persisting this data can lead to database corruption in
+        extreme cases such as power outage, meaning SCION fails to work on the
+        next boot. This is being investigated.
+
+        If true, /run/scion-* is used for data
+        If false, use /var/lib/scion-* is used for data
+      '';
+    };
     bypassBootstrapWarning = mkOption {
       type = types.bool;
       default = false;
@@ -18,7 +35,7 @@ in
   };
   config = mkIf cfg.enable {
     environment.systemPackages = [
-      pkgs.scion
+      cfg.package
     ];
     services.scion = {
       scion-dispatcher.enable = true;