bin/roowhod: configure loglevel via config file, use journald protocol
This commit is contained in:
+6
-7
@@ -11,6 +11,12 @@ in {
|
||||
type = lib.types.submodule {
|
||||
freeformType = format.type;
|
||||
options = {
|
||||
log_level = lib.mkOption {
|
||||
type = lib.types.enum [ "info" "debug" "trace" ];
|
||||
default = "info";
|
||||
description = "Log level for the roowho2 daemon.";
|
||||
};
|
||||
|
||||
rwhod = {
|
||||
enable = lib.mkEnableOption "the rwhod service" // {
|
||||
default = true;
|
||||
@@ -30,12 +36,6 @@ 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 {
|
||||
@@ -61,7 +61,6 @@ 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}";
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ nixpkgs.lib.nixosSystem {
|
||||
|
||||
services.roowho2 = {
|
||||
enable = true;
|
||||
logLevel = "trace";
|
||||
settings.log_level = "trace";
|
||||
};
|
||||
|
||||
programs.vim = {
|
||||
|
||||
Reference in New Issue
Block a user