From ade535a252dfe8e7e0bb7002bca2e66086cbaddb Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Mon, 30 Dec 2024 10:12:47 -0500 Subject: [PATCH] plymouth --- modules/ricing/plymouth.nix | 39 +++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/modules/ricing/plymouth.nix b/modules/ricing/plymouth.nix index 85b09b4..bfcc06b 100644 --- a/modules/ricing/plymouth.nix +++ b/modules/ricing/plymouth.nix @@ -4,30 +4,27 @@ pkgs, ... }: let - basic = { - theme = "breeze"; - logo = "${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png"; - font = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"; - extraConfig = ""; + rices = { + basic = { + theme = "deus_ex"; + logo = null; + font = null; + extraConfig = ""; + }; }; + + rice = let + enabledSet = lib.filter (set: config.ricing.${set}.enable) (lib.attrNames rices) // [null]; + in + if enabledSet != [null] + then rices.${enabledSet.head} + else null; in { boot.plymouth = { enable = true; - theme = - if config.ricing.basic.enable - then basic.theme - else null; - logo = - if config.ricing.basic.enable - then basic.logo - else null; - font = - if config.ricing.basic.enable - then basic.font - else null; - extraConfig = - if config.ricing.basic.enable - then basic.extraConfig - else null; + theme = rice.theme; + logo = rice.logo; + font = rice.font; + extraConfig = rice.extraConfig; }; }