nixos/modules/services/log-to-ram/default.nix

20 lines
421 B
Nix
Raw Normal View History

2023-05-31 22:26:38 +02:00
{ config, lib, ... }:
2024-01-01 13:14:24 +01:00
let cfg = config.services.az-log2ram;
in {
2023-05-31 22:26:38 +02:00
options = {
services.az-log2ram.enable = lib.mkEnableOption "Enable log to RAM";
};
config = lib.mkIf cfg.enable {
fileSystems."/var/log" = {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=512M" ];
};
services.journald.extraConfig = ''
SystemMaxUse=300M
Storage=volatile
'';
2022-08-17 20:26:46 +02:00
};
}