add generation limit (10) and weekly garbage collection
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
# ── 引导 ────────────────────────────────────────────────────
|
# ── 引导 ────────────────────────────────────────────────────
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 10; # 只保留最近 10 次迭代
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# ── 网络 ────────────────────────────────────────────────────
|
# ── 网络 ────────────────────────────────────────────────────
|
||||||
@@ -138,6 +139,13 @@
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# ── 自动清理旧的系统迭代 ────────────────────────────────────
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
# ── 系统状态版本(请勿修改) ────────────────────────────────
|
# ── 系统状态版本(请勿修改) ────────────────────────────────
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user