diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fed0e1d3..156312838 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,7 @@ jobs: - lutgen-rs - patched-gjs - ags + - plymouth-theme-catppuccin steps: - uses: easimon/maximize-build-space@v8 diff --git a/flake/pkgs/default.nix b/flake/pkgs/default.nix index 57a873fb2..9dad5506c 100644 --- a/flake/pkgs/default.nix +++ b/flake/pkgs/default.nix @@ -14,6 +14,7 @@ _: { # https://github.com/NixOS/nixpkgs/issues/195512 lutgen-rs = pkgs.callPackage ./lutgen-rs.nix {}; patched-gjs = pkgs.callPackage ./patched-gjs.nix {}; + plymouth-theme-catppuccin = pkgs.callPackage ./plymouth-theme-catppuccin.nix {}; bellado = inputs'.bellado.packages.default; catppuccinifier-cli = inputs'.catppuccinifier.packages.cli; diff --git a/flake/pkgs/plymouth-theme-catppuccin.nix b/flake/pkgs/plymouth-theme-catppuccin.nix new file mode 100644 index 000000000..92ff16b20 --- /dev/null +++ b/flake/pkgs/plymouth-theme-catppuccin.nix @@ -0,0 +1,33 @@ +{ + lib, + pkgs, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation { + pname = "plymouth-theme-catppuccin"; + version = "2022-12-10"; + + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "plymouth"; + rev = "d4105cf336599653783c34c4a2d6ca8c93f9281c"; + sha256 = "sha256-quBSH8hx3gD7y1JNWAKQdTk3CmO4t1kVo4cOGbeWlNE="; + }; + + installPhase = '' + mkdir -p "$out/share/plymouth/themes/" + cp -r "themes/"* "$out/share/plymouth/themes/" + + themes=("mocha" "macchiato" "frappe" "latte") + for dir in "''${themes[@]}"; do + cat "themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" | sed "s@\/usr\/@''${out}\/@" > "''${out}/share/plymouth/themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" + done + ''; + + meta = with lib; { + description = "Soothing pastel theme for Plymouth"; + homepage = "https://github.com/catppuccin/plymouth"; + license = licenses.mit; + platforms = platforms.linux; + }; +} diff --git a/modules/common/core/system/os/boot/plymouth/default.nix b/modules/common/core/system/os/boot/plymouth/default.nix index 40f0f314c..3020fc1e7 100644 --- a/modules/common/core/system/os/boot/plymouth/default.nix +++ b/modules/common/core/system/os/boot/plymouth/default.nix @@ -1,6 +1,7 @@ { config, lib, + self', pkgs, ... }: let @@ -16,7 +17,7 @@ in { } // lib.optionalAttrs cfg.withThemes { theme = "catppuccin-mocha"; - themePackages = [pkgs.nur.repos.nekowinston.plymouth-theme-catppuccin]; + themePackages = [self'.packages.plymouth-theme-catppuccin]; }; # make plymouth work with sleep