Merge pull request #282160 from gaykitty/stargazer-debug-mode

nixos/stargazer: add missing debugMode setting
This commit is contained in:
Pol Dellaiera 2024-03-10 14:31:06 +01:00 committed by GitHub
commit 2bd0c18d98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,6 +129,12 @@ in
example = lib.literalExpression "\"1y\""; example = lib.literalExpression "\"1y\"";
}; };
debugMode = lib.mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc "Run Stargazer in debug mode.";
};
routes = lib.mkOption { routes = lib.mkOption {
type = lib.types.listOf type = lib.types.listOf
(lib.types.submodule { (lib.types.submodule {
@ -195,7 +201,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.stargazer}/bin/stargazer ${configFile}"; ExecStart = "${pkgs.stargazer}/bin/stargazer ${configFile} ${lib.optionalString cfg.debugMode "-D"}";
Restart = "always"; Restart = "always";
# User and group # User and group
User = cfg.user; User = cfg.user;