summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd.nix
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2022-02-27 07:04:18 +0900
committerDominique Martinet <asmadeus@codewreck.org>2022-02-27 07:20:26 +0900
commit0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe (patch)
treefd909d858c64ef976f9e497dc08836a0496ce2dd /nixos/modules/system/boot/systemd.nix
parent005a18f6bda9376fe8f92b324db4ac05cd5387de (diff)
downloadnixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar.gz
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar.bz2
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar.lz
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar.xz
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.tar.zst
nixpkgs-0dadec45d805c31a0cff3d1ea4e0a3e9a357edfe.zip
logrotate/systemd: add 'minsize = 1M' to wtmp/btmp rotation
align with upstream logrotate which added the minsize rule at some point.
This avoids needlessly rotating the files too often as brought up in
https://github.com/NixOS/nixpkgs/pull/159187#issuecomment-1052426774
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r--nixos/modules/system/boot/systemd.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 441faa03af0..4019af63ad3 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -1224,6 +1224,7 @@ in
         keep = 1;
         extraConfig = ''
           create 0660 root ${config.users.groups.utmp.name}
+          minsize 1M
         '';
       };
       "/var/log/wtmp" = mapAttrs (_: mkDefault) {
@@ -1231,6 +1232,7 @@ in
         keep = 1;
         extraConfig = ''
           create 0664 root ${config.users.groups.utmp.name}
+          minsize 1M
         '';
       };
     };