From 8a54bbb01b9189bf6119f50ba55bb161e3549e72 Mon Sep 17 00:00:00 2001 From: Weathercold Date: Tue, 7 May 2024 22:40:31 -0400 Subject: [PATCH] feat(nixos): add support for plymouth --- modules/nixos/plymouth.nix | 22 ++++++++++++++++++++++ test.nix | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 modules/nixos/plymouth.nix diff --git a/modules/nixos/plymouth.nix b/modules/nixos/plymouth.nix new file mode 100644 index 00000000..fd42e408 --- /dev/null +++ b/modules/nixos/plymouth.nix @@ -0,0 +1,22 @@ +{ config +, pkgs +, lib +, ... +}: +let + inherit (lib) ctp mkIf; + cfg = config.boot.plymouth.catppuccin; + enable = cfg.enable && config.boot.plymouth.enable; +in +{ + options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt "plymouth"; + + config.boot.plymouth = mkIf enable { + theme = "catppuccin-${cfg.flavour}"; + themePackages = with pkgs; [ + (catppuccin-plymouth.override { + variant = cfg.flavour; + }) + ]; + }; +} diff --git a/test.nix b/test.nix index ab577dbe..1ddc8699 100644 --- a/test.nix +++ b/test.nix @@ -17,7 +17,10 @@ testers.runNixOSTest { common ]; - boot.loader.grub = enable; + boot = { + loader.grub = enable; + plymouth = enable; + }; console = enable;