nixos/klipper: add logFile option

Changed files
+13 -1
nixos
modules
services
+13 -1
nixos/modules/services/misc/klipper.nix
···
description = lib.mdDoc "The Klipper package.";
};
inputTTY = mkOption {
type = types.path;
default = "/run/klipper/tty";
···
systemd.services.klipper =
let
klippyArgs = "--input-tty=${cfg.inputTTY}"
-
+ optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}";
printerConfigPath =
if cfg.mutableConfig
then cfg.mutableConfigFolder + "/printer.cfg"
···
description = lib.mdDoc "The Klipper package.";
};
+
logFile = mkOption {
+
type = types.nullOr types.path;
+
default = null;
+
example = "/var/lib/klipper/klipper.log";
+
description = lib.mdDoc ''
+
Path of the file Klipper should log to.
+
If `null`, it logs to stdout, which is not recommended by upstream.
+
'';
+
};
+
inputTTY = mkOption {
type = types.path;
default = "/run/klipper/tty";
···
systemd.services.klipper =
let
klippyArgs = "--input-tty=${cfg.inputTTY}"
+
+ optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}"
+
+ optionalString (cfg.logFile != null) " --logfile=${cfg.logFile}"
+
;
printerConfigPath =
if cfg.mutableConfig
then cfg.mutableConfigFolder + "/printer.cfg"