From bc55f12776be0dcc40ba54a7b8c5ea1eda9e4037 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:46:20 +0200 Subject: [PATCH] chore: commonize bootloader --- common/boot.nix | 12 ++++++++++++ common/default.nix | 7 +++++++ hosts/default/configuration.nix | 2 +- hosts/server/configuration.nix | 6 +----- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 common/boot.nix create mode 100644 common/default.nix diff --git a/common/boot.nix b/common/boot.nix new file mode 100644 index 0000000..718d776 --- /dev/null +++ b/common/boot.nix @@ -0,0 +1,12 @@ +{lib,...}: +{ + boot.loader = { + timeout = lib.mkDefault 0; + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; + editor = false; + configurationLimit = 100; + }; + }; +} diff --git a/common/default.nix b/common/default.nix new file mode 100644 index 0000000..8adc809 --- /dev/null +++ b/common/default.nix @@ -0,0 +1,7 @@ +{...}: +{ + imports = [ + ./locale.nix + ./boot.nix + ]; +} diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 46a19d0..229ced6 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -12,7 +12,7 @@ ../../modules/websites ../../modules/plasma - ../../common/locale.nix + ../../common ]; boot = rec { diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index ba8a4dd..6614ebe 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -14,13 +14,9 @@ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") - ../../common/locale.nix + ../../common ]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - # LOVE me some blob hardware.enableRedistributableFirmware = true; hardware.enableAllFirmware = true;