Move log-to-ram into options

This commit is contained in:
Andreas Zweili 2023-05-31 22:26:38 +02:00
parent ed89695033
commit 8d4d975d35
4 changed files with 24 additions and 12 deletions

View File

@ -11,6 +11,7 @@
./libimobiledevice
./lockscreen
./logs-share
./log-to-ram
./makemkv
./nix-direnv
./pipewire

View File

@ -1,12 +1,21 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.services.az-log2ram;
in
{
fileSystems."/var/log" = {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=512M" ];
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
'';
};
services.journald.extraConfig = ''
SystemMaxUse=300M
Storage=volatile
'';
}

View File

@ -5,7 +5,6 @@ in
{
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4
"${inputs.self}/modules/log-to-ram"
];
boot = {
@ -123,7 +122,10 @@ in
systemd.services.dhcpd4.after = [ "usb-otg.service" ];
systemd.services."network-addresses-usb0".after = [ "usb-otg.service" ];
services.az-docker.enable = true;
services = {
az-docker.enable = true;
az-log2ram.enable = true;
};
programs = {
az-nix-direnv.enable = true;
az-tmux.enable = true;

View File

@ -2,7 +2,6 @@
{
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4
"${inputs.self}/modules/log-to-ram"
"${inputs.self}/modules/syslog"
];
@ -54,4 +53,5 @@
sudo umount /mnt
'';
};
services.az-log2ram.enable = true;
}