Move syslog into options
This commit is contained in:
parent
8d4d975d35
commit
7b1a962d8c
|
@ -18,6 +18,7 @@
|
|||
./rdp
|
||||
./restic-client-desktop
|
||||
./scripts
|
||||
./syslog
|
||||
./telegram-notifications
|
||||
./tlp
|
||||
./tmux
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.serivces.az-syslog;
|
||||
in
|
||||
{
|
||||
services.rsyslogd = {
|
||||
enable = true;
|
||||
defaultConfig = ''
|
||||
*.* action(type="omfwd" target="10.7.89.108" port="514" protocol="udp"
|
||||
action.resumeRetryCount="100"
|
||||
queue.type="linkedList" queue.size="10000")
|
||||
'';
|
||||
options = {
|
||||
services.az-syslog.enable = lib.mkEnableOption "Enable syslog";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.rsyslogd = {
|
||||
enable = true;
|
||||
defaultConfig = ''
|
||||
*.* action(type="omfwd" target="10.7.89.108" port="514" protocol="udp"
|
||||
action.resumeRetryCount="100"
|
||||
queue.type="linkedList" queue.size="10000")
|
||||
'';
|
||||
};
|
||||
systemd.services.syslog.after = [ "network-online.target" ];
|
||||
};
|
||||
systemd.services.syslog.after = [ "network-online.target" ];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
"${inputs.self}/modules/syslog"
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -53,5 +52,8 @@
|
|||
sudo umount /mnt
|
||||
'';
|
||||
};
|
||||
services.az-log2ram.enable = true;
|
||||
services = {
|
||||
az-log2ram.enable = true;
|
||||
az-syslog.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user