Regenerated
This commit is contained in:
+6
-63
@@ -226,98 +226,41 @@ let
|
||||
hostname = config.networking.hostName or "traveldroid";
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# Bootloader (UEFI + GRUB)
|
||||
#################################
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
efiSysMountPoint = "/boot"; # matches hardware
|
||||
};
|
||||
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev"; # safe for UEFI
|
||||
device = "nodev"; # safe for UEFI
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
timeout = 5;
|
||||
};
|
||||
|
||||
#################################
|
||||
# Kernel / initrd
|
||||
#################################
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"udev.log_level=3"
|
||||
"rd.systemd.show_status=false"
|
||||
];
|
||||
|
||||
boot.kernelParams = [ "quiet" "splash" "udev.log_level=3" "rd.systemd.show_status=false" ];
|
||||
boot.consoleLogLevel = 0;
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_usb_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
#################################
|
||||
# Plymouth boot splash
|
||||
#################################
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
themePackages = [
|
||||
(pkgs.adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "rings" ];
|
||||
})
|
||||
(pkgs.adi1090x-plymouth-themes.override { selected_themes = [ "rings" ]; })
|
||||
];
|
||||
};
|
||||
|
||||
#################################
|
||||
# CPU microcode
|
||||
#################################
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
#################################
|
||||
# Nix host platform
|
||||
#################################
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
#################################
|
||||
# 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