bin/roowhod: configure loglevel via config file, use journald protocol

This commit is contained in:
2026-04-29 06:03:11 +09:00
parent 448ce6e500
commit a3aae2b28b
6 changed files with 47 additions and 15 deletions
+6 -7
View File
@@ -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
View File
@@ -48,7 +48,7 @@ nixpkgs.lib.nixosSystem {
services.roowho2 = {
enable = true;
logLevel = "trace";
settings.log_level = "trace";
};
programs.vim = {