Merge pull request #257415 from ehmry/yggdrasil

nixos/yggdrasil: add extraArgs option
This commit is contained in:
Lin Jian 2023-10-07 02:05:36 +08:00 committed by GitHub
commit 272dba1e31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -121,6 +121,13 @@ in
restarted. Keys are stored at ${keysPath}.
'');
extraArgs = mkOption {
type = listOf str;
default = [ ];
example = [ "-loglevel" "info" ];
description = lib.mdDoc "Extra command line arguments.";
};
};
};
@ -181,7 +188,7 @@ in
"${binYggdrasil} -genconf") + " > /run/yggdrasil/yggdrasil.conf"}
# start yggdrasil
${binYggdrasil} -useconffile /run/yggdrasil/yggdrasil.conf
${binYggdrasil} -useconffile /run/yggdrasil/yggdrasil.conf ${lib.strings.escapeShellArgs cfg.extraArgs}
'';
serviceConfig = {

View file

@ -116,6 +116,7 @@ in import ./make-test-python.nix ({ pkgs, ...} : {
networking.firewall.allowedTCPPorts = [ 43210 ];
services.yggdrasil = {
enable = true;
extraArgs = [ "-loglevel" "error" ];
denyDhcpcdInterfaces = [ "ygg0" ];
settings = {
IfTAPMode = true;