Plymouth option not applying logo

Hi there, I am trying to use NixOS Search - Options - plymouth.logo.

What I am doing is:

  • modules/sys/plymouth/build/icon.nix
{ lib, stdenv }:

stdenv.mkDerivation {
  name = "plymouth-icon";
  version = "1.0";

  src = ./plymouth.png;

  unpackPhase = "true"; # Skip the unpack phase

  installPhase = ''
    mkdir -p $out/share/icons/hicolor/48x48/apps
    cp $src $out/share/icons/hicolor/48x48/apps/plymouth.png
  '';

  meta = {
    description = "Icon for Plymouth";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ bashfulrobot ];
  };
}

then:

  • modules/sys/plymouth/default.nix
{ config, pkgs, lib, ... }:
let cfg = config.sys.plymouth;
plymouthIcon = pkgs.callPackage ./build/icon.nix {};
in {

  options = {
    sys.plymouth.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable Plymouth.";
    };
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      plymouthIcon
    ];
    boot.plymouth = {
      enable = true;
      font = "${pkgs.work-sans}/share/fonts/opentype/WorkSans-Regular.ttf";
      logo = "${plymouthIcon}/share/icons/hicolor/48x48/apps/plymouth.png";
      extraConfig = ''
        ShowDelay=0
        DeviceScale=2
      '';
    };

  };
}

Everything builds as expected.

Now if I look at the results:

  • icon created:
❯ sudo file /nix/store/f50cc8vz73mkd2xvbvx002mb3vcqj2n7-plymouth-icon/share/icons/hicolor/48x48/apps/plymouth.png

/nix/store/f50cc8vz73mkd2xvbvx002mb3vcqj2n7-plymouth-icon/share/icons/hicolor/48x48/apps/plymouth.png: PNG image data, 1024 x 768, 8-bit/color RGBA, non-interlaced
  • config file:
❯ bat -p /nix/store/lv0al3pkknzjg4ny58qfrx4sbxdmn37k-plymouthd.conf

[Daemon]
ShowDelay=0
DeviceTimeout=8
Theme=stylix
ShowDelay=0
DeviceScale=2

I could have expected the logo to show up there. Could this be due to the fact I am using stylix?

Any ideas?

Thank you.

I noticed you are showing the contents of a store path. Can you confirm that this is the one in use?

This is how I had found it.

nix-store --query --requisites /run/current-system | grep --ignore-case $query

Is there a better way?

Well, I’d think that it’s available on the running system at /etc/plymouthd.conf or similar, isn’t it?

I am an idiot. I always forget the items are linked in place and tend to look at the store as the “source of truth”.

❯ bat -p /etc/plymouth/plymouthd.conf
[Daemon]
ShowDelay=0
DeviceTimeout=8
Theme=stylix
ShowDelay=0
DeviceScale=2
❯ readlink -f plymouthd.conf 
/nix/store/lv0al3pkknzjg4ny58qfrx4sbxdmn37k-plymouthd.conf