diff options
| author | Fuwn <[email protected]> | 2024-08-29 15:35:30 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-08-29 15:35:30 -0700 |
| commit | fa16bf82075a2cc58e605017d0217ec5eff5ff77 (patch) | |
| tree | 5eeed79ba692ac58beacbe97502b7ff7d57d1c12 /modules/boot/default.nix | |
| parent | hi (diff) | |
| download | nixos-config-fa16bf82075a2cc58e605017d0217ec5eff5ff77.tar.xz nixos-config-fa16bf82075a2cc58e605017d0217ec5eff5ff77.zip | |
hi
Diffstat (limited to 'modules/boot/default.nix')
| -rw-r--r-- | modules/boot/default.nix | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/modules/boot/default.nix b/modules/boot/default.nix index 4f37c41..d0f5852 100644 --- a/modules/boot/default.nix +++ b/modules/boot/default.nix @@ -1,12 +1,62 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: +let + configurationLimit = 10; +in { boot = { loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; + timeout = 5; + + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + + systemd-boot = { + enable = false; + editor = true; + consoleMode = "max"; + memtest86.enable = true; + netbootxyz.enable = true; + configurationLimit = configurationLimit; + }; + + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + useOSProber = true; + configurationLimit = configurationLimit; + memtest86.enable = true; + gfxmodeEfi = "1920x1080"; + gfxmodeBios = "1920x1080"; + splashMode = "normal"; + + extraEntries = '' + menuentry "Arch Linux (linux-clear)" { + linux /vmlinuz-linux-clear + initrd /amd-ucode.img + initrd /booster-linux-clear.img + options root=PARTUUID=f510f35d-76a0-4469-aad5-da449541ecd2 rootflags=subvol=@ rw rootfstype=btrfs psi=1 nvidia_drm.modeset=1 + } + ''; + + theme = pkgs.fetchFromGitHub { + owner = "Lxtharia"; + repo = "minegrub-theme"; + rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3"; + sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap"; + }; + }; }; kernelPackages = pkgs.linuxPackages_zen; - kernelParams = [ "nvidia-drm.fbdev=1" ]; + kernelModules = [ "v4l2loopback" ]; + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + + kernelParams = [ + "nvidia-drm.fbdev=1" + "nvidia.NVreg_PreserveVideoMemoryAllocations=1" + ]; }; } |