mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(klipper): set log file
It complains that logging to stdout will cause performance issues, for some reason...
This commit is contained in:
parent
51911b37ac
commit
369aede78e
2 changed files with 15 additions and 4 deletions
|
|
@ -5,7 +5,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (gensokyo-zone.lib) mapListToAttrs;
|
||||
inherit (gensokyo-zone.lib) mapListToAttrs mkAlmostOptionDefault;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkAfter mkOptionDefault;
|
||||
inherit (lib.attrsets) nameValuePair;
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
in {
|
||||
options.services.klipper = with lib.types; {
|
||||
quiet = mkEnableOption "more silent logs";
|
||||
logRotate = mkEnableOption "logrotate";
|
||||
configFiles = mkOption {
|
||||
type = listOf path;
|
||||
default = [];
|
||||
|
|
@ -54,4 +55,7 @@ in {
|
|||
ln -sfT ${includeFile} ${escapeShellArg "${cfg.mutableConfigFolder}/${includeFileName}"}
|
||||
'');
|
||||
};
|
||||
config.services.logrotate.settings.klipper = mkIf (cfg.enable && cfg.logRotate && cfg.logFile != null) {
|
||||
files = mkAlmostOptionDefault cfg.logFile;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue