diff options
| author | Fuwn <[email protected]> | 2024-09-04 19:57:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-04 19:57:20 -0700 |
| commit | 8b5e5079e5fd00eadf2e3926c104e4ecf99a5779 (patch) | |
| tree | d35acd86220ae3ffa521677d55acb37e9436ba64 /modules/system/boot | |
| parent | styles (diff) | |
| download | nixos-config-8b5e5079e5fd00eadf2e3926c104e4ecf99a5779.tar.xz nixos-config-8b5e5079e5fd00eadf2e3926c104e4ecf99a5779.zip | |
refac
Diffstat (limited to 'modules/system/boot')
| -rw-r--r-- | modules/system/boot/default.nix | 32 | ||||
| -rw-r--r-- | modules/system/boot/grub.nix | 32 | ||||
| -rw-r--r-- | modules/system/boot/systemd-boot.nix | 10 |
3 files changed, 74 insertions, 0 deletions
diff --git a/modules/system/boot/default.nix b/modules/system/boot/default.nix new file mode 100644 index 0000000..9a517ef --- /dev/null +++ b/modules/system/boot/default.nix @@ -0,0 +1,32 @@ +{ + pkgs, + config, + ... +}: +{ + imports = [ + ./grub.nix + ./systemd-boot.nix + ]; + + boot = { + crashDump.enable = false; + consoleLogLevel = 3; + kernelPackages = pkgs.linuxPackages_zen; + + kernelParams = [ + "iommu=pt" + "threadirqs" + ]; + + loader = { + timeout = 5; + generationsDir.copyKernels = true; + + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + }; + }; +} diff --git a/modules/system/boot/grub.nix b/modules/system/boot/grub.nix new file mode 100644 index 0000000..49e0eef --- /dev/null +++ b/modules/system/boot/grub.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: +{ + boot.loader.grub = { + enable = true; + device = "nodev"; + efiSupport = true; + useOSProber = true; + configurationLimit = 10; + memtest86.enable = true; + gfxmodeEfi = "1920x1080x32"; + gfxmodeBios = "1920x1080x32"; + gfxpayloadBios = "keep"; + gfxpayloadEfi = "keep"; + 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"; + }; + }; +} diff --git a/modules/system/boot/systemd-boot.nix b/modules/system/boot/systemd-boot.nix new file mode 100644 index 0000000..5b50bad --- /dev/null +++ b/modules/system/boot/systemd-boot.nix @@ -0,0 +1,10 @@ +{ + boot.loader.systemd-boot = { + enable = false; + editor = true; + consoleMode = "max"; + memtest86.enable = true; + netbootxyz.enable = true; + configurationLimit = 10; + }; +} |