This repository has been archived on 2024-11-22. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/modules/system/boot/grub.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.system.boot.grub;
in {
options.modules.system.boot.grub = {
enable = mkBoolOpt true;
};
config = mkIf cfg.enable {
boot.loader = {
grub = {
enable = true;
useOSProver = true;
efiSupport = true;
fsIdentifier = "label";
devices = [ "nodev" ];
extraEntries = ''
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
'';
theme = pkgs.stdenv.mkDerivation {
pname = "distro-grub-themes";
version = "3.1";
src = pkgs.fetchFromGitHub {
owner = "AdisonCavani";
repo = "distro-grub-themes";
rev = "v3.1";
hash = "sha256-ZcoGbbOMDDwjLhsvs77C7G7vINQnprdfI37a9ccrmPs=";
};
installPhase = "cp -r customize/nixos $out";
};
};
efi = {
canTouchEfiVariables = true;
};
};
};
}