switch to GRUB with os-prober for multi-boot
This commit is contained in:
+7
-9
@@ -17,9 +17,14 @@
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# ── 引导 ────────────────────────────────────────────────────
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10; # 只保留最近 10 次迭代
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
configurationLimit = 10;
|
||||
useOSProber = true; # 检测其他系统(Windows 等)
|
||||
};
|
||||
|
||||
# ── 网络 ────────────────────────────────────────────────────
|
||||
networking.hostName = "nixos";
|
||||
@@ -139,13 +144,6 @@
|
||||
ffmpeg
|
||||
];
|
||||
|
||||
# ── 自动清理旧的系统迭代 ────────────────────────────────────
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# ── 系统状态版本(请勿修改) ────────────────────────────────
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user