Loading nixos/modules/services/networking/tayga.nix +13 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ let data-dir ${cfg.dataDir} ${concatStringsSep "\n" (mapAttrsToList (ipv4: ipv6: "map " + ipv4 + " " + ipv6) cfg.mappings)} ${optionalString ((builtins.length cfg.log) > 0) '' log ${concatStringsSep " " cfg.log} ''} ''; addrOpts = Loading Loading @@ -132,6 +136,15 @@ in } ''; }; log = mkOption { type = types.listOf types.str; default = [ ]; description = "Packet errors to log (drop, reject, icmp, self)"; example = literalExpression '' [ "drop" "reject" "icmp" "self" ] ''; }; }; }; Loading nixos/tests/tayga.nix +12 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,12 @@ mappings = { "192.0.2.42" = "2001:db8::2"; }; log = [ "drop" "reject" "icmp" "self" ]; }; environment.systemPackages = [ pkgs.tcpdump ]; }; Loading Loading @@ -205,6 +211,12 @@ mappings = { "192.0.2.42" = "2001:db8::2"; }; log = [ "drop" "reject" "icmp" "self" ]; }; environment.systemPackages = [ pkgs.tcpdump ]; }; Loading Loading
nixos/modules/services/networking/tayga.nix +13 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ let data-dir ${cfg.dataDir} ${concatStringsSep "\n" (mapAttrsToList (ipv4: ipv6: "map " + ipv4 + " " + ipv6) cfg.mappings)} ${optionalString ((builtins.length cfg.log) > 0) '' log ${concatStringsSep " " cfg.log} ''} ''; addrOpts = Loading Loading @@ -132,6 +136,15 @@ in } ''; }; log = mkOption { type = types.listOf types.str; default = [ ]; description = "Packet errors to log (drop, reject, icmp, self)"; example = literalExpression '' [ "drop" "reject" "icmp" "self" ] ''; }; }; }; Loading
nixos/tests/tayga.nix +12 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,12 @@ mappings = { "192.0.2.42" = "2001:db8::2"; }; log = [ "drop" "reject" "icmp" "self" ]; }; environment.systemPackages = [ pkgs.tcpdump ]; }; Loading Loading @@ -205,6 +211,12 @@ mappings = { "192.0.2.42" = "2001:db8::2"; }; log = [ "drop" "reject" "icmp" "self" ]; }; environment.systemPackages = [ pkgs.tcpdump ]; }; Loading