diff --git a/configuration.nix b/configuration.nix index 69737c6..a5d4944 100644 --- a/configuration.nix +++ b/configuration.nix @@ -18,6 +18,7 @@ # ── 引导 ──────────────────────────────────────────────────── boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot.configurationLimit = 10; # 只保留最近 10 次迭代 boot.loader.efi.canTouchEfiVariables = true; # ── 网络 ──────────────────────────────────────────────────── @@ -138,6 +139,13 @@ ffmpeg ]; + # ── 自动清理旧的系统迭代 ──────────────────────────────────── + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + # ── 系统状态版本(请勿修改) ──────────────────────────────── system.stateVersion = "25.11"; }