module.nix: add logLevel option
This commit is contained in:
@@ -30,6 +30,12 @@ in {
|
||||
default = { };
|
||||
description = "Configuration settings for Roowho2.";
|
||||
};
|
||||
|
||||
logLevel = lib.mkOption {
|
||||
type = lib.types.enum [ "quiet" "info" "debug" "trace" ];
|
||||
default = "info";
|
||||
description = "Log level for the roowho2 daemon.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -55,6 +61,7 @@ in {
|
||||
};
|
||||
|
||||
systemd.services.roowho2 = {
|
||||
environment.RUST_LOG = cfg.logLevel;
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStart = "${lib.getExe' cfg.package "roowhod"} --config ${format.generate "roowho2-config.toml" cfg.settings}";
|
||||
|
||||
@@ -48,6 +48,7 @@ nixpkgs.lib.nixosSystem {
|
||||
|
||||
services.roowho2 = {
|
||||
enable = true;
|
||||
logLevel = "debug";
|
||||
};
|
||||
|
||||
programs.vim = {
|
||||
|
||||
Reference in New Issue
Block a user