From 9a621386194b9abeb0afc66ffe02024debe4b696 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sun, 4 Feb 2024 22:17:19 +0800 Subject: [PATCH] feat(boot): add memtest option --- global/boot/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/global/boot/default.nix b/global/boot/default.nix index 7da95ebe..fe27a997 100644 --- a/global/boot/default.nix +++ b/global/boot/default.nix @@ -8,6 +8,11 @@ in { enable = mkEnableOption "bootloader installation and maintenance" // { default = true; }; systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; }; lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote"; + memtest = mkOption { + type = with types; nullOr int; + default = null; + description = "memtest passes to perform on boot"; + }; }; config = let @@ -20,6 +25,7 @@ in { loader.systemd-boot.enable = cfg.systemd-boot; loader.efi.canTouchEfiVariables = true; tmp.cleanOnBoot = true; + kernelParams = optional (cfg.memtest != null) "memtest=${toString cfg.memtest}"; }; # symlink for sbctl