diff --git a/modules/installer/default.nix b/modules/installer/default.nix index a3262bc..cb3d7f1 100644 --- a/modules/installer/default.nix +++ b/modules/installer/default.nix @@ -43,8 +43,8 @@ in { loader.timeout = lib.mkForce 0; plymouth = { enable = true; - theme = "desk-os"; - themePackages = [(pkgs.callPackage ../../packages/desk-os-plymouth {})]; + theme = "desk-os-installer"; + themePackages = [(pkgs.callPackage ../../packages/desk-os-installer-plymouth {})]; }; # NOTE(m): Enable kernel modules that improve wifi support on # Macbooks during installation. diff --git a/packages/desk-os-installer-plymouth/default.nix b/packages/desk-os-installer-plymouth/default.nix new file mode 100644 index 0000000..b370694 --- /dev/null +++ b/packages/desk-os-installer-plymouth/default.nix @@ -0,0 +1,16 @@ +{stdenv}: +stdenv.mkDerivation { + pname = "desk-os-installer-plymouth"; + version = "0.0.1"; + + src = ./src; + + installPhase = '' + runHook preInstall + sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' desk-os-installer.plymouth + sed -i 's:\(^ScriptFile=\)/usr:\1'"$out"':' desk-os-installer.plymouth + mkdir -p $out/share/plymouth/themes/desk-os-installer + cp * $out/share/plymouth/themes/desk-os-installer + runHook postInstall + ''; +} diff --git a/packages/desk-os-installer-plymouth/src/desk-os-installer.plymouth b/packages/desk-os-installer-plymouth/src/desk-os-installer.plymouth new file mode 100644 index 0000000..a06fe58 --- /dev/null +++ b/packages/desk-os-installer-plymouth/src/desk-os-installer.plymouth @@ -0,0 +1,8 @@ +[Plymouth Theme] +Name=deskOS Installer +Description=A theme that displays the deskOS installer logo +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/desk-os-installer +ScriptFile=/usr/share/plymouth/themes/desk-os-installer/desk-os-installer.script diff --git a/packages/desk-os-installer-plymouth/src/desk-os-installer.png b/packages/desk-os-installer-plymouth/src/desk-os-installer.png new file mode 100644 index 0000000..a3ba4df Binary files /dev/null and b/packages/desk-os-installer-plymouth/src/desk-os-installer.png differ diff --git a/packages/desk-os-installer-plymouth/src/desk-os-installer.script b/packages/desk-os-installer-plymouth/src/desk-os-installer.script new file mode 100644 index 0000000..48d3c6a --- /dev/null +++ b/packages/desk-os-installer-plymouth/src/desk-os-installer.script @@ -0,0 +1,8 @@ +image = Image("desk-os-installer.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);