From 5bef57fb167c1a585b70fc3a9807d02ba2754d26 Mon Sep 17 00:00:00 2001 From: foglar Date: Tue, 31 Dec 2024 19:31:09 +0100 Subject: [PATCH] bootloader module added --- ginoza/configuration.nix | 4 +--- kogami/configuration.nix | 4 +--- nixos/system/settings/bootloader.nix | 12 ++++++++++++ nixos/system/system.nix | 2 ++ 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 nixos/system/settings/bootloader.nix diff --git a/ginoza/configuration.nix b/ginoza/configuration.nix index d636eab..f5c201f 100644 --- a/ginoza/configuration.nix +++ b/ginoza/configuration.nix @@ -23,12 +23,10 @@ }; }; - # Bootloader - boot.loader.systemd-boot.enable = true; - # System level configuration sys = { audio.enable = true; + bootloader.systemd-boot.enable = true; desktop = { plasma.enable = false; gnome.enable = true; diff --git a/kogami/configuration.nix b/kogami/configuration.nix index 981f4a2..db6bcc9 100644 --- a/kogami/configuration.nix +++ b/kogami/configuration.nix @@ -29,12 +29,10 @@ ]; }; - # Bootloader - boot.loader.systemd-boot.enable = true; - # System level configuration sys = { audio.enable = true; + bootloader.systemd-boot.enable = true; desktop = { steamdeck.enable = true; }; diff --git a/nixos/system/settings/bootloader.nix b/nixos/system/settings/bootloader.nix new file mode 100644 index 0000000..9da16df --- /dev/null +++ b/nixos/system/settings/bootloader.nix @@ -0,0 +1,12 @@ +{ + lib, + config, +}: { + options = { + sys.bootloader.systemd.enable = lib.mkEnableOption "Enable systemd-boot as the bootloader"; + }; + + config = lib.mkIf config.sys.bootloader.systemd.enable { + boot.loader.systemd-boot.enable = true; + }; +} diff --git a/nixos/system/system.nix b/nixos/system/system.nix index 5fa5dfc..6a70705 100644 --- a/nixos/system/system.nix +++ b/nixos/system/system.nix @@ -15,12 +15,14 @@ ./settings/loginManager.nix ./settings/style.nix ./settings/default-applications.nix + ./settings/bootloader.nix ./settings/user.nix ]; sys = { audio.enable = lib.mkDefault true; + bootloader.systemd-boot.enable = lib.mkDefault true; desktop = { plasma.enable = if userSettings.plasma == true