Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
99565d24c8
6 changed files with 24 additions and 1 deletions
BIN
deemz.org/GeoLite2-ASN.mmdb
Normal file
BIN
deemz.org/GeoLite2-ASN.mmdb
Normal file
Binary file not shown.
BIN
deemz.org/GeoLite2-City.mmdb
Normal file
BIN
deemz.org/GeoLite2-City.mmdb
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 MiB |
BIN
deemz.org/GeoLite2-Country.mmdb
Normal file
BIN
deemz.org/GeoLite2-Country.mmdb
Normal file
Binary file not shown.
|
|
@ -83,6 +83,25 @@ let secrets = import ../secrets.nix; in
|
|||
};
|
||||
users.groups.icomidal = {};
|
||||
|
||||
# Run goaccess script hourly
|
||||
systemd.timers.goaccess = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
Persistent = true;
|
||||
Unit = "goaccess.service";
|
||||
};
|
||||
};
|
||||
systemd.services.goaccess = {
|
||||
script = "${pkgs.gzip}/bin/zcat /var/log/nginx/access.log.*.gz | ${pkgs.goaccess}/bin/goaccess -a -o /var/log/nginx/goaccess.html --log-format=COMBINED --geoip-database=${./GeoLite2-City.mmdb} --geoip-database=${./GeoLite2-Country.mmdb} --geoip-database=${./GeoLite2-ASN.mmdb} /var/log/nginx/access.log /var/log/nginx/access.log.1 -";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "nginx";
|
||||
Nice = 19; # low priority
|
||||
IOSchedulingClass = "idle";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.xkb.layout = "us";
|
||||
services.xserver.xkb.options = "eurosign:e";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue