add boot module
This commit is contained in:
parent
8e33b1b9c5
commit
3fbbe84dca
5 changed files with 29 additions and 2 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
modules = with self.nixosModules; [
|
modules = with self.nixosModules; [
|
||||||
user
|
user
|
||||||
packages
|
packages
|
||||||
|
agenix
|
||||||
|
boot
|
||||||
/etc/nixos/hardware-configuration.nix
|
/etc/nixos/hardware-configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{ ... }: {
|
{inputs, ... }: {
|
||||||
flake.nixosModules = {
|
flake.nixosModules.agenix = {config, ...}: {
|
||||||
|
imports = [
|
||||||
|
inputs.agenix.nixosModules.default
|
||||||
|
];
|
||||||
age = {
|
age = {
|
||||||
enable = true;
|
enable = true;
|
||||||
identityPaths = [ "/var/lib/misc/key.age" ];
|
identityPaths = [ "/var/lib/misc/key.age" ];
|
||||||
|
|
|
||||||
22
modules/system/core/boot.nix
Normal file
22
modules/system/core/boot.nix
Normal file
|
|
@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue