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; + }; + }; +}