Skip to content

Commit

Permalink
Control logs in admin module
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander V. Nikolaev <[email protected]>
  • Loading branch information
avnik committed Aug 29, 2024
1 parent 506436a commit 46a389f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nixos/modules/admin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in
{
options.givc.admin = {
enable = mkEnableOption "Enable givc-admin module.";
debug = mkEnableOption "Enable givc-admin debug logging.";

name = mkOption {
description = "Host name (without domain).";
Expand Down Expand Up @@ -134,6 +135,10 @@ in
"CA_CERT" = "${cfg.tls.caCertPath}";
"HOST_CERT" = "${cfg.tls.certPath}";
"HOST_KEY" = "${cfg.tls.keyPath}";
}
// attrsets.optionalAttrs cfg.debug {
"RUST_BACKTRACE" = "1";
"GIVC_LOG" = "debug";
};
};
networking.firewall.allowedTCPPorts =
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/admin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ in
];
givc.admin = {
enable = true;
debug = true;
name = "admin-vm";
addr = addrs.adminvm;
port = "9001";
Expand Down

0 comments on commit 46a389f

Please sign in to comment.