From ab45974a4a31dc8343ee9aa892141b7125f1e2ac Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 14 Apr 2024 12:19:46 +0200 Subject: [PATCH] move rtr options into networking.dn42 --- modules/bird2.nix | 8 ++++---- modules/roagen.nix | 5 ++--- modules/stayrtr.nix | 7 +++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/bird2.nix b/modules/bird2.nix index b375428..3039a94 100644 --- a/modules/bird2.nix +++ b/modules/bird2.nix @@ -38,7 +38,7 @@ in roa4 table dnroa4; roa6 table dnroa6; - ${lib.optionalString config.services.dn42-stayrtr.enable '' + ${lib.optionalString config.networking.dn42.stayrtr.enable '' protocol rpki roa_dn42 { roa4 { table dnroa4; }; roa6 { table dnroa6; }; @@ -49,14 +49,14 @@ in expire 7200; } ''} - ${lib.optionalString config.services.dn42-roagen.enable '' + ${lib.optionalString config.networking.dn42.roagen.enable '' protocol static { roa4 { table dnroa4; }; - include "${config.services.dn42-roagen.outputDir}/dn42-roa4.conf"; + include "${config.networking.dn42.roagen.outputDir}/dn42-roa4.conf"; } protocol static { roa6 { table dnroa6; }; - include "${config.services.dn42-roagen.outputDir}/dn42-roa6.conf"; + include "${config.networking.dn42.roagen.outputDir}/dn42-roa6.conf"; } ''} diff --git a/modules/roagen.nix b/modules/roagen.nix index 293636b..9afbf34 100644 --- a/modules/roagen.nix +++ b/modules/roagen.nix @@ -1,11 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.services.dn42-roagen; - + cfg = config.networking.dn42.roagen; in { - options.services.dn42-roagen = with lib; { + options.networking.dn42.roagen = with lib; { enable = mkEnableOption "dn42-roagen"; outputDir = mkOption { diff --git a/modules/stayrtr.nix b/modules/stayrtr.nix index d5d65de..7898528 100644 --- a/modules/stayrtr.nix +++ b/modules/stayrtr.nix @@ -1,15 +1,14 @@ { config, lib, pkgs, ... }: let - cfg = config.services.dn42-stayrtr; - + cfg = config.networking.dn42.stayrtr; in { - options.services.dn42-stayrtr = with lib; { + options.networking.dn42.stayrtr = with lib; { enable = mkEnableOption "dn42-stayrtr"; cache = mkOption { - type = types.url; + type = types.str; default = "https://dn42.burble.com/roa/dn42_roa_46.json"; }; };