Skip to content

Commit

Permalink
feat: boot options
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Nov 9, 2024
1 parent fe26c6c commit a0a970f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
58 changes: 31 additions & 27 deletions hosts/pandora/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,6 @@
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.kernelPatches = [
{
name = "edge-config";
patch = null;
# derived from
# https://github.com/AsahiLinux/PKGBUILDs/blob/stable/linux-asahi/config.edge
extraConfig = ''
DRM_SIMPLEDRM_BACKLIGHT n
BACKLIGHT_GPIO n
DRM_APPLE m
APPLE_SMC m
APPLE_SMC_RTKIT m
APPLE_RTKIT m
APPLE_MBOX m
GPIO_MACSMC m
DRM_VGEM n
DRM_SCHED y
DRM_GEM_SHMEM_HELPER y
DRM_ASAHI m
SUSPEND y
'';
}
];

hardware.asahi = {
enable = true;
extractPeripheralFirmware = true;
Expand All @@ -43,8 +19,36 @@
experimentalGPUInstallMode = "replace";
};

boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = lib.mkForce false;
};
kernelPatches = [
{
name = "edge-config";
patch = null;
# derived from
# https://github.com/AsahiLinux/PKGBUILDs/blob/stable/linux-asahi/config.edge
extraConfig = ''
DRM_SIMPLEDRM_BACKLIGHT n
BACKLIGHT_GPIO n
DRM_APPLE m
APPLE_SMC m
APPLE_SMC_RTKIT m
APPLE_RTKIT m
APPLE_MBOX m
GPIO_MACSMC m
DRM_VGEM n
DRM_SCHED y
DRM_GEM_SHMEM_HELPER y
DRM_ASAHI m
SUSPEND y
'';
}
];

boot.initrd.availableKernelModules = ["usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["usbhid" "dm-snapshot"];
initrd.availableKernelModules = ["usbhid" "usb_storage" "sd_mod"];
initrd.kernelModules = ["usbhid" "dm-snapshot"];
};
}
3 changes: 2 additions & 1 deletion system/boot/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{pkgs, ...}: {
{...}: {
boot = {
initrd = {
verbose = false;
systemd.enable = true;
};
loader.systemd-boot.configurationLimit = 5;
};
}

0 comments on commit a0a970f

Please sign in to comment.