Auto gc on servers

This commit is contained in:
Henrik Lissner 2021-02-21 09:34:52 -05:00
parent 8c97c46f5d
commit 77870b6a14

View file

@ -1,8 +1,19 @@
# hosts/server.nix
#
# Only to be used for headless servers, at home or abroad, with more
# security/automation-minded configuration.
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
boot.kernelPackages = pkgs.linuxPackages_latest_hardened; boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
systemd = { systemd = {
services.clear-log = { services.clear-log = {
description = "Clear >1 month-old logs every week"; description = "Clear >1 month-old logs every week";