This is a flake of Grub themes to use with NixOS. Each of the directories in themes gives a theme which is usable.
It is simple to add themes to this flake! Just add a directory to themes and put a default.nix
file in there. Feel free to submit a pull request to add themes.
To use one, set the boot.loader.grub.theme
option in your NixOS configuration to the desired derivation generated by this flake.
First you will have to add this repo to your flake.nix
file as a new input.
# flake.nix
{
description = "NixOS configuration";
inputs = {
...
# Add nixos-grub-themes to your inputs ...
nixos-grub-themes.url = "github:jeslie0/nixos-grub-themes";
};
outputs = inputs@{ nixpkgs, ... }: {
nixosConfigurations = {
my_host = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; }; # pass the inputs into the configuration module
modules = [
./configuration.nix
];
};
};
};
}
After that, you can configure the theme as shown below. In this example it is inside the configuration.nix
file but it can be any file you choose.
# configuration.nix
{ inputs, config, pkgs, lib, ... }:
{
boot.loader.grub = {
... # your existing config
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos;
};
}