nixos/nezha-agent: add extraFlags

This commit is contained in:
Moraxyc 2024-10-29 00:08:48 +08:00
parent 4c6a66b84e
commit 68b122d2f6
No known key found for this signature in database

View File

@ -92,6 +92,14 @@ in
Address to the dashboard
'';
};
extraFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "--gpu" ];
description = ''
Extra command-line flags passed to nezha-agent.
'';
};
};
};
@ -125,6 +133,7 @@ in
++ lib.optional cfg.gpu "--gpu"
++ lib.optional cfg.temperature "--temperature"
++ lib.optional cfg.useIPv6CountryCode "--use-ipv6-countrycode"
++ cfg.extraFlags
);
wantedBy = [ "multi-user.target" ];
};