Commit 5a66b77

HPCesia <me@hpcesia.com>
2025-09-30 17:45:37
refactor: migrate global boot configs
1 parent b395aea
Changed files (2)
modules
os-modules
nixos
modules/core/boot.nix
@@ -0,0 +1,12 @@
+{lib, ...}: {
+  flake.modules.nixos.boot-core = _: {
+    boot.loader = {
+      # Don't need to keep too many generations when using Git for version control.
+      systemd-boot.configurationLimit = lib.mkDefault 10;
+      # pick the highest resolution for systemd-boot's console.
+      consoleMode = lib.mkDefault "max";
+      # Wait x seconds to select the boot entry.
+      timeout = lib.mkDefault 8;
+    };
+  };
+}
os-modules/nixos/base/core.nix
@@ -1,13 +1,4 @@
-{lib, ...}: {
-  boot.loader.systemd-boot = {
-    # we use Git for version control, so we don't need to keep too many generations.
-    configurationLimit = lib.mkDefault 10;
-    # pick the highest resolution for systemd-boot's console.
-    consoleMode = lib.mkDefault "max";
-  };
-
-  boot.loader.timeout = lib.mkDefault 8; # wait for x seconds to select the boot entry
-
+{
   # for power management
   services = {
     power-profiles-daemon = {