summaryrefslogtreecommitdiff
path: root/system/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'system/bootloader')
-rw-r--r--system/bootloader/default.nix7
-rw-r--r--system/bootloader/grub.nix20
-rw-r--r--system/bootloader/limine.nix24
-rw-r--r--system/bootloader/plymouth.nix25
4 files changed, 76 insertions, 0 deletions
diff --git a/system/bootloader/default.nix b/system/bootloader/default.nix
new file mode 100644
index 0000000..29fa61d
--- /dev/null
+++ b/system/bootloader/default.nix
@@ -0,0 +1,7 @@
+_: {
+ imports = [
+ ./grub.nix
+ ./limine.nix
+ ./plymouth.nix
+ ];
+}
diff --git a/system/bootloader/grub.nix b/system/bootloader/grub.nix
new file mode 100644
index 0000000..167e779
--- /dev/null
+++ b/system/bootloader/grub.nix
@@ -0,0 +1,20 @@
+{
+ lib,
+ config,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.bootloader.grub;
+in {
+ config = mkIf cfg.enable {
+ boot.loader = {
+ efi.canTouchEfiVariables = true;
+ grub = {
+ enable = true;
+ efiSupport = true;
+ device = "nodev";
+ splashImage = config.theme.wallpaper;
+ };
+ };
+ };
+}
diff --git a/system/bootloader/limine.nix b/system/bootloader/limine.nix
new file mode 100644
index 0000000..3487809
--- /dev/null
+++ b/system/bootloader/limine.nix
@@ -0,0 +1,24 @@
+{
+ lib,
+ config,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.bootloader.limine;
+in {
+ config = mkIf cfg.enable {
+ boot.loader = {
+ efi.canTouchEfiVariables = true;
+ limine = {
+ enable = true;
+ efiSupport = true;
+ secureBoot.enable = cfg.secureBoot.enable;
+ maxGenerations = 10;
+ style = {
+ backdrop = config.theme.colors.base;
+ wallpapers = [config.theme.wallpaper];
+ };
+ };
+ };
+ };
+}
diff --git a/system/bootloader/plymouth.nix b/system/bootloader/plymouth.nix
new file mode 100644
index 0000000..9338a84
--- /dev/null
+++ b/system/bootloader/plymouth.nix
@@ -0,0 +1,25 @@
+{
+ lib,
+ config,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.bootloader.plymouth;
+in {
+ config = mkIf cfg.enable {
+ boot = {
+ kernelParams = [
+ "quiet"
+ "splash"
+ "rd.udev.log_level=3"
+ "systemd.show_status=auto"
+ "udev.log_priority=3"
+ "vt.global_cursor_default=0"
+ ];
+ plymouth = {
+ enable = true;
+ theme = "bgrt";
+ };
+ };
+ };
+}