From e551976a8a98faa82417a244e9ce1d1ca37c9282 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Fri, 19 Jul 2024 12:21:24 +0200 Subject: [PATCH] Extract bootloader and silent boot configs into separate files --- modules/system/boot.nix | 38 ---------------------------------- modules/system/boot/loader.nix | 18 ++++++++++++++++ modules/system/boot/silent.nix | 19 +++++++++++++++++ 3 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 modules/system/boot.nix create mode 100644 modules/system/boot/loader.nix create mode 100644 modules/system/boot/silent.nix diff --git a/modules/system/boot.nix b/modules/system/boot.nix deleted file mode 100644 index e49504f..0000000 --- a/modules/system/boot.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, ... }: -{ - options.myConfig.boot = { - loader.systemd-boot.enable = lib.mkEnableOption ""; - silent = lib.mkEnableOption ""; - }; - - config = lib.mkMerge [ - (lib.mkIf config.myConfig.boot.loader.systemd-boot.enable { - boot.tmp.cleanOnBoot = true; - boot.loader = { - systemd-boot = { - enable = true; - editor = false; - configurationLimit = 20; - }; - efi.canTouchEfiVariables = true; - timeout = 0; - }; - systemd.watchdog.rebootTime = "10"; - }) - - (lib.mkIf config.myConfig.boot.silent { - boot = { - kernelParams = [ - "quiet" - "rd.systemd.show_status=false" - "rd.udev.log_level=3" - "udev.log_priority=3" - ]; - consoleLogLevel = 3; - initrd.verbose = false; - initrd.systemd.enable = true; - plymouth.enable = true; - }; - }) - ]; -} diff --git a/modules/system/boot/loader.nix b/modules/system/boot/loader.nix new file mode 100644 index 0000000..6f2c089 --- /dev/null +++ b/modules/system/boot/loader.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +{ + options.myConfig.boot.loader.systemd-boot.enable = lib.mkEnableOption ""; + + config = lib.mkIf config.myConfig.boot.loader.systemd-boot.enable { + boot.tmp.cleanOnBoot = true; + boot.loader = { + systemd-boot = { + enable = true; + editor = false; + configurationLimit = 20; + }; + efi.canTouchEfiVariables = true; + timeout = 0; + }; + systemd.watchdog.rebootTime = "10"; + }; +} diff --git a/modules/system/boot/silent.nix b/modules/system/boot/silent.nix new file mode 100644 index 0000000..2d48489 --- /dev/null +++ b/modules/system/boot/silent.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: +{ + options.myConfig.boot.silent = lib.mkEnableOption ""; + + config = lib.mkIf config.myConfig.boot.silent { + boot = { + kernelParams = [ + "quiet" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + consoleLogLevel = 3; + initrd.verbose = false; + initrd.systemd.enable = true; + plymouth.enable = true; + }; + }; +}