Add deskOS Plymouth theme package

This commit is contained in:
Michael Smith 2024-09-11 16:09:46 +02:00
parent 107470819c
commit 73d2aaee2d
7 changed files with 39 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

View File

@ -20,7 +20,8 @@
loader.efi.canTouchEfiVariables = true;
plymouth = {
enable = true;
logo = ../../assets/blank-plymouth-logo.png;
theme = "desk-os";
themePackages = [ (pkgs.callPackage ../../packages/desk-os-plymouth {}) ];
};
};

View File

@ -47,8 +47,11 @@ in {
initrd.verbose = false;
loader.systemd-boot.enable = true;
loader.timeout = lib.mkForce 0;
plymouth.enable = true;
plymouth = {
enable = true;
theme = "desk-os";
themePackages = [ (pkgs.callPackage ../../packages/desk-os-plymouth {}) ];
};
# NOTE(m): Enable kernel modules that improve wifi support on
# Macbooks during installation.
# See https://nixos.org/manual/nixos/stable/#sec-building-image-drivers

View File

@ -0,0 +1,16 @@
{stdenv}:
stdenv.mkDerivation {
pname = "desk-os-plymouth";
version = "0.0.1";
src = ./src;
installPhase = ''
runHook preInstall
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' desk-os.plymouth
sed -i 's:\(^ScriptFile=\)/usr:\1'"$out"':' desk-os.plymouth
mkdir -p $out/share/plymouth/themes/desk-os
cp * $out/share/plymouth/themes/desk-os
runHook postInstall
'';
}

View File

@ -0,0 +1,8 @@
[Plymouth Theme]
Name=deskOS
Description=A theme that displays the deskOS logo
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/desk-os
ScriptFile=/usr/share/plymouth/themes/desk-os/desk-os.script

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,8 @@
image = Image("desk-os.png");
pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;
sprite = Sprite(image);
sprite.SetX(pos_x);
sprite.SetY(pos_y);