Regenerated
This commit is contained in:
+24
-7
@@ -226,21 +226,20 @@ let
|
||||
hostname = config.networking.hostName or "traveldroid";
|
||||
in
|
||||
{
|
||||
|
||||
#################################
|
||||
# Bootloader (UEFI + GRUB)
|
||||
#################################
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true; # NixOS writes EFI vars safely
|
||||
efiSysMountPoint = "/boot"; # matches your hardware-configuration
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev"; # safe for UEFI systems
|
||||
useOSProber = true; # detect other OSes if present
|
||||
device = "nodev"; # safe for UEFI
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
timeout = 5;
|
||||
@@ -253,7 +252,7 @@ in
|
||||
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash" # Plymouth splash
|
||||
"splash"
|
||||
"udev.log_level=3"
|
||||
"rd.systemd.show_status=false"
|
||||
];
|
||||
@@ -272,7 +271,6 @@ in
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
|
||||
#################################
|
||||
# Plymouth boot splash
|
||||
#################################
|
||||
@@ -301,6 +299,25 @@ in
|
||||
# System state version
|
||||
#################################
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
#################################
|
||||
# Automatic GRUB update after rebuild
|
||||
#################################
|
||||
system.postBootCommands = ''
|
||||
echo "Regenerating GRUB menu..."
|
||||
${pkgs.nixosModules.grub}/bin/grub-mkconfig -o /boot/grub/grub.cfg || true
|
||||
'';
|
||||
|
||||
systemd.services.grub-update = {
|
||||
description = "Update GRUB menu on boot";
|
||||
after = [ "local-fs.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.nixosModules.grub}/bin/grub-mkconfig -o /boot/grub/grub.cfg";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user