From 3fbbe84dcad7c6a9d7ed156e8d70e9353d560e06 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 12:32:12 +0200 Subject: [PATCH] add boot module --- modules/default.nix | 2 ++ modules/system/agenix/agenix.nix | 7 +++++-- modules/system/core/boot.nix | 22 ++++++++++++++++++++++ modules/system/{ => core}/packages.nix | 0 modules/system/{ => core}/user.nix | 0 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 modules/system/core/boot.nix rename modules/system/{ => core}/packages.nix (100%) rename modules/system/{ => core}/user.nix (100%) diff --git a/modules/default.nix b/modules/default.nix index 9808457..be24619 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -3,6 +3,8 @@ modules = with self.nixosModules; [ user packages + agenix + boot /etc/nixos/hardware-configuration.nix ]; }; diff --git a/modules/system/agenix/agenix.nix b/modules/system/agenix/agenix.nix index c153b55..00e7b55 100644 --- a/modules/system/agenix/agenix.nix +++ b/modules/system/agenix/agenix.nix @@ -1,5 +1,8 @@ -{ ... }: { - flake.nixosModules = { +{inputs, ... }: { + flake.nixosModules.agenix = {config, ...}: { + imports = [ + inputs.agenix.nixosModules.default + ]; age = { enable = true; identityPaths = [ "/var/lib/misc/key.age" ]; diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix new file mode 100644 index 0000000..9f14319 --- /dev/null +++ b/modules/system/core/boot.nix @@ -0,0 +1,22 @@ +{ ... }: { + flake.nixosModules.boot = { + options = { + dualBoot = lib.mkOption { + type = lib.types.bool; + default = false; + description = "wether to enable windows boot entry to limine or not"; + }; + }; + boot.loader = { + efi.canTouchEfiVariables = true; + limine = { + enable = true; + extraEntries = lib.mkIf dualBoot '' + /Windows 11 + protocol: efi_boot_entry + entry: Windows Boot Manager + ''; + }; + }; + }; +} diff --git a/modules/system/packages.nix b/modules/system/core/packages.nix similarity index 100% rename from modules/system/packages.nix rename to modules/system/core/packages.nix diff --git a/modules/system/user.nix b/modules/system/core/user.nix similarity index 100% rename from modules/system/user.nix rename to modules/system/core/user.nix