nixos/tayga: add log option
This allows configuring logging in tayga, and enables it for the NixOS test.
This commit is contained in:
parent
c204edcb7c
commit
b45ba94a0e
@ -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 =
|
||||
@ -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" ]
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -139,6 +139,12 @@
|
||||
mappings = {
|
||||
"192.0.2.42" = "2001:db8::2";
|
||||
};
|
||||
log = [
|
||||
"drop"
|
||||
"reject"
|
||||
"icmp"
|
||||
"self"
|
||||
];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.tcpdump ];
|
||||
};
|
||||
@ -205,6 +211,12 @@
|
||||
mappings = {
|
||||
"192.0.2.42" = "2001:db8::2";
|
||||
};
|
||||
log = [
|
||||
"drop"
|
||||
"reject"
|
||||
"icmp"
|
||||
"self"
|
||||
];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.tcpdump ];
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user