From 9c10b395d3651de5911331890512426a72638a3a Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 27 Apr 2026 16:05:01 +0900 Subject: [PATCH] module.nix: add `logLevel` option --- nix/module.nix | 7 +++++++ nix/vm.nix | 1 + 2 files changed, 8 insertions(+) diff --git a/nix/module.nix b/nix/module.nix index 14f5d59..1437999 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -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}"; diff --git a/nix/vm.nix b/nix/vm.nix index cc929d4..807b9a9 100644 --- a/nix/vm.nix +++ b/nix/vm.nix @@ -48,6 +48,7 @@ nixpkgs.lib.nixosSystem { services.roowho2 = { enable = true; + logLevel = "debug"; }; programs.vim = {