Skip to content

Commit

Permalink
feat: add grub
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgon committed Nov 5, 2024
1 parent 79b6674 commit 3a9947f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/system/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _: {
./auto-upgrade.nix
./backup.nix
./disks.nix
./grub.nix
./healthcheck.nix
./home-manager.nix
./impermanence.nix
Expand Down
33 changes: 33 additions & 0 deletions modules/system/grub.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.mySystem.grub;
grubTheme = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "grub";
rev = "v1.0.0";
sha256 = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=";
};
in
{
options.mySystem.grub = {
enable = lib.mkEnableOption "grub bootloader";
};

config = lib.mkIf cfg.enable {
boot.loader = {
systemd-boot.enable = false;
grub = {
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
theme = "${grubTheme}/src/catppuccin-mocha-grub-theme";
};
};
};
}

0 comments on commit 3a9947f

Please sign in to comment.