Warning: Using this repo for some reason bloats the initrd
quite a bit (up to 50 MB). Use it with boot.loader.systemd-boot.configurationLimit or a /boot
of at least a gigabyte.
On EFI Systems it's also possible to keep the initrd on the main partition when switching to Grub. Checkout the nixos wiki.
This repo contains a plymouth theme for Nixos, thanks to discourse for giving me motivation.
The package is currently not in nixpkgs.
You can include it in your flakes.nix
like this:
{
inputs.nixos-boot.url = "github:Melkor333/nixos-boot";
outputs = { self, nixpkgs, nixos-boot }:
{
nixosConfigurations."<hostname>" = nixpkgs.lib.nixosSystem {
modules = [ nixos-boot.nixosModules.default ./configuration.nix ];
system = "x86_64-linux";
};
};
}
You can include it in your configuration.nix
like this:
{ config, lib, pkgs, ...}:
let
# Fetch the repository
nixos-boot-src = pkgs.fetchFromGitHub {
owner = "Melkor333";
repo = "nixos-boot";
rev = "main";
sha256 = "sha256-Dj8LhVTOrHEnqgONbCEKIEyglO7zQej+KS08faO9NJk=";
};
in
{
imports = [ "${nixos-boot-src}/modules.nix" ];
}
Enable nixos-boot in your configuration:
{ config, lib, pkgs, ...}:
{
# ...
nixos-boot = {
enable = true;
# Different colors
# bgColor.red = 100; # 0 - 255
# bgColor.green = 100; # 0 - 255
# bgColor.blue = 100; # 0 - 255
# If you want to make sure the theme is seen when your computer starts too fast
# duration = 3; # in seconds
};
}
The first theme, load & unload: