summaryrefslogtreecommitdiff
path: root/modules/boot
diff options
context:
space:
mode:
Diffstat (limited to 'modules/boot')
-rw-r--r--modules/boot/default.nix45
-rw-r--r--modules/boot/grub.nix30
-rw-r--r--modules/boot/systemd-boot.nix10
3 files changed, 45 insertions, 40 deletions
diff --git a/modules/boot/default.nix b/modules/boot/default.nix
index d0f5852..eb128ed 100644
--- a/modules/boot/default.nix
+++ b/modules/boot/default.nix
@@ -1,8 +1,10 @@
{ pkgs, config, ... }:
-let
- configurationLimit = 10;
-in
{
+ imports = [
+ ./grub.nix
+ ./systemd-boot.nix
+ ];
+
boot = {
loader = {
timeout = 5;
@@ -11,43 +13,6 @@ in
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;
diff --git a/modules/boot/grub.nix b/modules/boot/grub.nix
new file mode 100644
index 0000000..b562370
--- /dev/null
+++ b/modules/boot/grub.nix
@@ -0,0 +1,30 @@
+{ pkgs, ... }:
+{
+ boot.loader.grub = {
+ enable = true;
+ device = "nodev";
+ efiSupport = true;
+ useOSProber = true;
+ configurationLimit = 10;
+ 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";
+ };
+ };
+}
diff --git a/modules/boot/systemd-boot.nix b/modules/boot/systemd-boot.nix
new file mode 100644
index 0000000..5b50bad
--- /dev/null
+++ b/modules/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;
+ };
+}