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:
The second theme, a spinning logo looking a bit communistic:
- Create directory under src
- Copy all files as .png in there
- copy the
src/template.plymouth
tosrc/THEME/THEME.plymouth
- replace the word THEME with the actual theme
- adjust the description & Comment
- copy the
src/template.script
tosrc/THEME/THEME.script
- change the line "image_quantity" to match the amount of pictures
- Create a gif from the pngs in the folder:
magick convert -delay 5 -loop 0 -background white $(ls -v *.png) -alpha remove THEME.gif
- Add the new entry to
modules.nix
type = lib.types.enum [ "load_unload" "evil-nixos" "THEME" ];
- Create a Readme Entry