Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/palette.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Generate palette

on:
workflow_dispatch:

jobs:
palette:
name: Generate palette file

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Checkout repository
uses: actions/checkout@v5
with:
repository: catppuccin/palette
path: palette

- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Install Cachix
uses: cachix/cachix-action@v16
with:
name: catppuccin
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Convert palette to Nix file
run: |
nix run nixpkgs#nix-converter -- -f palette/palette.json >modules/palette/data.nix
rm -rf palette

- name: Format Nix files
run: nix fmt

- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ github.token }}
commit-message: "chore: update palette"
title: "chore: update palette"
signoff: true
sign-commits: true
branch: "update-palette"

- name: Run CI
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run ci.yml \
--ref ${{ steps.create-pull-request.outputs.pull-request-branch }}
8 changes: 8 additions & 0 deletions modules/global.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ in
description = "Port sources used across all options";
};

palette = lib.mkOption {
type = (import ./palette/type.nix) lib;
readOnly = true;
description = "Global Catppuccin palette";
};

cache.enable = lib.mkEnableOption "the usage of Catppuccin's binary cache";
};

Expand All @@ -54,5 +60,7 @@ in
substituters = [ "https://catppuccin.cachix.org" ];
trusted-public-keys = [ "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" ];
};

catppuccin.palette = (import ./palette/data.nix).${config.catppuccin.flavor};
};
}
Loading
Loading