diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2023-05-14 13:00:46 -0400 |
---|---|---|
committer | Bernardo Meurer <bernardo@meurer.org> | 2023-05-14 13:02:08 -0400 |
commit | 570fff5e92d55dd4d071535d35a858d57b69150d (patch) | |
tree | 5421fac71c092504a155910423b101592e1908a7 | |
parent | 7a5f684ffdf0ba0c5448347ed5615c1a7ce338ad (diff) | |
download | nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar.gz nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar.bz2 nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar.lz nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar.xz nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.tar.zst nixpkgs-570fff5e92d55dd4d071535d35a858d57b69150d.zip |
nixos/klipper: add logFile option
-rw-r--r-- | nixos/modules/services/misc/klipper.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index b2d76b9e0fa..ad881d4462a 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -23,6 +23,16 @@ in 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"; @@ -151,7 +161,9 @@ in systemd.services.klipper = let klippyArgs = "--input-tty=${cfg.inputTTY}" - + optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}"; + + optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}" + + optionalString (cfg.logFile != null) " --logfile=${cfg.logFile}" + ; printerConfigPath = if cfg.mutableConfig then cfg.mutableConfigFolder + "/printer.cfg" |