├── .editorconfig ├── .github └── workflows │ ├── backport.yml │ ├── ci.yml │ ├── format.yml │ ├── publish.yml │ ├── update-locks.yml │ └── website.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── assets └── previews │ ├── frappe.webp │ ├── latte.webp │ ├── macchiato.webp │ ├── mocha.webp │ └── preview.webp ├── cliff.toml ├── default.nix ├── dev ├── README.md ├── flake.lock └── flake.nix ├── docs ├── book.toml ├── mk-search.nix ├── mk-site.nix ├── package.nix ├── src │ ├── CONTRIBUTING.md │ ├── README.md │ ├── SUMMARY.md │ ├── faq.md │ ├── getting-started │ │ ├── README.md │ │ ├── flakes.md │ │ └── stable-nix.md │ └── options.md └── theme │ ├── catppuccin.css │ └── index.hbs ├── flake.lock ├── flake.nix ├── modules ├── global.nix ├── home-manager │ ├── aerc.nix │ ├── alacritty.nix │ ├── all-modules.nix │ ├── atuin.nix │ ├── bat.nix │ ├── bottom.nix │ ├── btop.nix │ ├── cava.nix │ ├── chrome.nix │ ├── cursors.nix │ ├── default.nix │ ├── delta.nix │ ├── dunst.nix │ ├── fcitx5.nix │ ├── fish.nix │ ├── foot.nix │ ├── freetube.nix │ ├── fuzzel.nix │ ├── fzf.nix │ ├── gh-dash.nix │ ├── ghostty.nix │ ├── gitui.nix │ ├── glamour.nix │ ├── gtk.nix │ ├── helix.nix │ ├── hyprland.nix │ ├── hyprlock.nix │ ├── imv.nix │ ├── k9s.nix │ ├── kitty.nix │ ├── kvantum.nix │ ├── lazygit.nix │ ├── lsd.nix │ ├── mako.nix │ ├── micro.nix │ ├── mpv.nix │ ├── neovim.nix │ ├── newsboat.nix │ ├── nushell.nix │ ├── obs.nix │ ├── polybar.nix │ ├── qutebrowser.nix │ ├── rio.nix │ ├── rofi.nix │ ├── sioyek.nix │ ├── skim.nix │ ├── spotify-player.nix │ ├── starship.nix │ ├── sway.nix │ ├── swaylock.nix │ ├── swaync.nix │ ├── thunderbird.nix │ ├── tmux.nix │ ├── tofi.nix │ ├── vscode.nix │ ├── waybar.nix │ ├── wezterm.nix │ ├── wlogout.nix │ ├── yazi.nix │ ├── zathura.nix │ ├── zed-editor.nix │ ├── zellij.nix │ └── zsh-syntax-highlighting.nix ├── lib │ └── default.nix ├── nixos │ ├── all-modules.nix │ ├── default.nix │ ├── fcitx5.nix │ ├── gitea.nix │ ├── grub.nix │ ├── plymouth.nix │ ├── sddm.nix │ └── tty.nix └── tests │ ├── common.nix │ ├── darwin.nix │ ├── home.nix │ ├── nixos.nix │ └── username.txt ├── pkgs ├── aerc │ └── package.nix ├── alacritty │ └── package.nix ├── buildCatppuccinPort │ └── package.nix ├── catppuccinInstallHook │ ├── package.nix │ └── script.sh ├── catwalk │ └── package.nix ├── cursors │ └── package.nix ├── delta │ └── package.nix ├── fcitx5 │ └── package.nix ├── fetchCatppuccinPort │ └── package.nix ├── gitea │ └── package.nix ├── grub │ └── package.nix ├── gtk │ └── package.nix ├── hyprlock │ └── package.nix ├── k9s │ └── package.nix ├── kvantum │ └── package.nix ├── lazygit │ └── package.nix ├── micro │ └── package.nix ├── nvim │ └── package.nix ├── palette │ └── package.nix ├── paws.py ├── plymouth │ └── package.nix ├── qutebrowser │ └── package.nix ├── rofi │ └── package.nix ├── sddm │ └── package.nix ├── sources.json ├── spotify-player │ └── package.nix ├── swaync │ └── package.nix ├── tmux │ └── package.nix ├── vscode │ └── package.nix ├── wezterm │ └── package.nix ├── whiskers │ └── package.nix ├── wlogout │ └── package.nix ├── zathura │ └── package.nix └── zed │ └── package.nix ├── renovate.json └── shell.nix /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # EditorConfig is awesome: https://EditorConfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | indent_size = 2 10 | indent_style = space 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # go 16 | [*.go] 17 | indent_style = tab 18 | indent_size = 4 19 | 20 | # python 21 | [*.{ini,py,py.tpl,rst}] 22 | indent_size = 4 23 | 24 | # rust 25 | [*.rs] 26 | indent_size = 4 27 | 28 | # documentation, utils 29 | [*.{md,mdx,diff}] 30 | trim_trailing_whitespace = false 31 | 32 | # windows shell scripts 33 | [*.{cmd,bat,ps1}] 34 | end_of_line = crlf 35 | 36 | # npins 37 | [.sources/sources.json] 38 | trim_trailing_whitespace = false 39 | -------------------------------------------------------------------------------- /.github/workflows/backport.yml: -------------------------------------------------------------------------------- 1 | # Based on https://github.com/NixOS/nixpkgs/blob/c81ecdf95b3a0f73ded448f14416cd66beeb5e1a/.github/workflows/backport.yml 2 | name: Backport 3 | 4 | on: 5 | pull_request_target: 6 | types: [closed, labeled] 7 | 8 | # WARNING: 9 | # When extending this action, be aware that $GITHUB_TOKEN allows write access to 10 | # the GitHub repository. This means that it should not evaluate user input in a 11 | # way that allows code injection. 12 | 13 | jobs: 14 | backport: 15 | name: Backport Pull Request 16 | 17 | if: ${{ github.repository_owner == 'catppuccin' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) }} 18 | 19 | runs-on: ubuntu-latest 20 | 21 | permissions: 22 | contents: write 23 | pull-requests: write 24 | 25 | steps: 26 | - name: Checkout repository 27 | uses: actions/checkout@v4 28 | with: 29 | ref: ${{ github.event.pull_request.head.sha }} 30 | 31 | - name: Create backport PRs 32 | uses: korthout/backport-action@v3 33 | with: 34 | pull_description: |- 35 | Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}. 36 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | paths: 7 | - '**.lock' 8 | - '**.nix' 9 | - 'pkgs/**' 10 | 11 | - '.github/workflows/ci.yml' 12 | pull_request: 13 | paths: 14 | - '**.lock' 15 | - '**.nix' 16 | - 'pkgs/**' 17 | 18 | - '.github/workflows/ci.yml' 19 | workflow_dispatch: 20 | 21 | 22 | jobs: 23 | packages: 24 | name: Build Packages 25 | 26 | strategy: 27 | fail-fast: false 28 | matrix: 29 | os: [ macos-latest, macos-13, ubuntu-latest, ubuntu-24.04-arm ] 30 | 31 | runs-on: ${{ matrix.os }} 32 | 33 | steps: 34 | - name: Maximize Space 35 | uses: easimon/maximize-build-space@v10 36 | if: ${{ matrix.os != 'macos-latest' && matrix.os != 'macos-13' }} 37 | with: 38 | overprovision-lvm: true 39 | remove-android: true 40 | remove-dotnet: true 41 | remove-codeql: true 42 | remove-haskell: true 43 | remove-docker-images: true 44 | 45 | - name: Checkout repository 46 | uses: actions/checkout@v4 47 | 48 | - name: Install Nix 49 | uses: cachix/install-nix-action@v31 50 | 51 | - name: Install Cachix 52 | uses: cachix/cachix-action@v16 53 | with: 54 | name: catppuccin 55 | authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} 56 | 57 | - name: Run build 58 | run: | 59 | nix build './dev#all-ports' --print-build-logs --show-trace 60 | 61 | modules: 62 | name: Test Modules 63 | needs: packages 64 | 65 | strategy: 66 | fail-fast: false 67 | matrix: 68 | os: [ macos-latest, ubuntu-latest ] 69 | 70 | runs-on: ${{ matrix.os }} 71 | 72 | steps: 73 | - name: Maximize Space 74 | uses: easimon/maximize-build-space@v10 75 | if: ${{ matrix.os != 'macos-latest' }} 76 | with: 77 | overprovision-lvm: true 78 | remove-android: true 79 | remove-dotnet: true 80 | remove-codeql: true 81 | remove-haskell: true 82 | remove-docker-images: true 83 | 84 | - name: Checkout repository 85 | uses: actions/checkout@v4 86 | 87 | - name: Install Nix 88 | uses: cachix/install-nix-action@v31 89 | 90 | - name: Install Cachix 91 | uses: cachix/cachix-action@v16 92 | with: 93 | name: catppuccin 94 | authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} 95 | 96 | - name: Run tests 97 | run: | 98 | nix flake check './dev' --print-build-logs --show-trace 99 | 100 | release-gate: 101 | name: Release Gate 102 | needs: [ modules, packages ] 103 | 104 | runs-on: ubuntu-latest 105 | 106 | steps: 107 | - name: Exit with error 108 | if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} 109 | run: exit 1 110 | -------------------------------------------------------------------------------- /.github/workflows/format.yml: -------------------------------------------------------------------------------- 1 | name: Format 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | paths: 7 | - "**.nix" 8 | - "**.lock" 9 | 10 | - ".github/workflows/format.yml" 11 | workflow_dispatch: 12 | 13 | jobs: 14 | nix: 15 | name: Nix files 16 | 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - name: Checkout repository 21 | uses: actions/checkout@v4 22 | with: 23 | token: ${{ secrets.PUSH_TOKEN }} 24 | 25 | - name: Set Git user info 26 | run: | 27 | git config user.name 'github-actions[bot]' 28 | git config user.email 'github-actions[bot]@users.noreply.github.com' 29 | 30 | - name: Get short revision 31 | id: rev 32 | run: 33 | echo "rev=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" 34 | 35 | - name: Install Nix 36 | uses: cachix/install-nix-action@v31 37 | 38 | - name: Format changes 39 | run: | 40 | nix fmt **/**.nix 41 | 42 | - name: Commit changes 43 | run: | 44 | if ! git diff --color=always --exit-code; then 45 | git commit -am "style: format ${{ steps.rev.outputs.rev }}" 46 | git push 47 | fi 48 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v?[0-9]+.[0-9]+.[0-9]+*" 7 | workflow_dispatch: 8 | inputs: 9 | tag: 10 | description: "The existing tag to publish" 11 | type: "string" 12 | required: true 13 | 14 | jobs: 15 | flakehub: 16 | name: Publish to FlakeHub 17 | 18 | runs-on: ubuntu-latest 19 | 20 | permissions: 21 | id-token: write 22 | contents: read 23 | 24 | steps: 25 | - name: Checkout repository 26 | uses: actions/checkout@v4 27 | with: 28 | ref: ${{ inputs.tag }} 29 | 30 | - name: Install Nix 31 | uses: cachix/install-nix-action@v31 32 | 33 | - name: Push to FlakeHub 34 | uses: DeterminateSystems/flakehub-push@v5 35 | with: 36 | tag: ${{ inputs.tag }} 37 | visibility: "public" 38 | 39 | flakestry: 40 | name: Publish to Flakestry 41 | 42 | runs-on: ubuntu-latest 43 | 44 | permissions: 45 | id-token: write 46 | contents: read 47 | 48 | steps: 49 | - name: Checkout repository 50 | uses: actions/checkout@v4 51 | with: 52 | ref: ${{ inputs.tag }} 53 | 54 | - name: Install Nix 55 | uses: cachix/install-nix-action@v31 56 | 57 | - name: Push to Flakestry 58 | uses: flakestry/flakestry-publish@main 59 | with: 60 | version: ${{ inputs.tag }} 61 | -------------------------------------------------------------------------------- /.github/workflows/update-locks.yml: -------------------------------------------------------------------------------- 1 | name: Update lockfiles 2 | 3 | on: 4 | schedule: 5 | # run every friday 6 | - cron: "0 0 * * 5" 7 | workflow_dispatch: 8 | 9 | jobs: 10 | flake: 11 | name: Update flake.lock 12 | 13 | runs-on: ubuntu-latest 14 | 15 | permissions: 16 | actions: write 17 | contents: write 18 | pull-requests: write 19 | 20 | steps: 21 | - name: Checkout repository 22 | uses: actions/checkout@v4 23 | 24 | - name: Install Nix 25 | uses: cachix/install-nix-action@v31 26 | with: 27 | # NOTE: Required for subflake 28 | install_url: https://releases.nixos.org/nix/nix-2.26.0/install 29 | 30 | - name: Update Flakes 31 | run: | 32 | nix flake update --flake . 33 | nix flake update --flake ./dev 34 | 35 | - name: Create pull request 36 | id: create-pull-request 37 | uses: peter-evans/create-pull-request@v7 38 | with: 39 | token: ${{ github.token }} 40 | commit-message: "chore: update flakes" 41 | title: "chore: update flakes" 42 | signoff: true 43 | sign-commits: true 44 | branch: "update-flake-lock" 45 | 46 | - name: Run CI 47 | env: 48 | GH_TOKEN: ${{ github.token }} 49 | run: | 50 | gh workflow run ci.yml \ 51 | --ref ${{ steps.create-pull-request.outputs.pull-request-branch }} 52 | 53 | ports: 54 | name: Update port sources 55 | 56 | runs-on: ubuntu-latest 57 | 58 | permissions: 59 | actions: write 60 | contents: write 61 | pull-requests: write 62 | 63 | steps: 64 | - name: Checkout repository 65 | uses: actions/checkout@v4 66 | 67 | - name: Install Nix 68 | uses: cachix/install-nix-action@v31 69 | with: 70 | # NOTE: Required for paws 71 | nix_path: nixpkgs=channel:nixos-unstable 72 | 73 | - name: Update ports 74 | run: ./pkgs/paws.py 75 | 76 | - name: Create pull request 77 | id: create-pull-request 78 | uses: peter-evans/create-pull-request@v7 79 | with: 80 | token: ${{ github.token }} 81 | commit-message: "chore: update port sources" 82 | title: "chore: update port sources" 83 | signoff: true 84 | sign-commits: true 85 | branch: "update-ports" 86 | 87 | - name: Run CI 88 | env: 89 | GH_TOKEN: ${{ github.token }} 90 | run: | 91 | gh workflow run ci.yml \ 92 | --ref ${{ steps.create-pull-request.outputs.pull-request-branch }} 93 | -------------------------------------------------------------------------------- /.github/workflows/website.yml: -------------------------------------------------------------------------------- 1 | name: Build & deploy website 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | paths: 7 | - '**.lock' 8 | - '**.nix' 9 | - 'docs/**' 10 | - 'pkgs/**' 11 | - 'CHANGELOG.md' 12 | 13 | - '.github/workflows/website.yml' 14 | pull_request: 15 | paths: 16 | - '**.lock' 17 | - '**.nix' 18 | - 'docs/**' 19 | - 'pkgs/**' 20 | - 'CHANGELOG.md' 21 | 22 | - '.github/workflows/website.yml' 23 | workflow_dispatch: 24 | 25 | jobs: 26 | build: 27 | name: Build site 28 | 29 | runs-on: ubuntu-latest 30 | 31 | steps: 32 | - name: Checkout repository 33 | uses: actions/checkout@v4 34 | 35 | - name: Install Nix 36 | uses: cachix/install-nix-action@v31 37 | 38 | - name: Install Cachix 39 | uses: cachix/cachix-action@v16 40 | with: 41 | name: catppuccin 42 | authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} 43 | 44 | - name: Run build 45 | run: | 46 | nix build \ 47 | --print-build-logs \ 48 | --show-trace \ 49 | './dev#site' 50 | 51 | - name: Get artifact directory 52 | id: find-path 53 | run: | 54 | # exit if no `result` from `nix build` 55 | [ ! -L result ] && exit 1 56 | echo "path=$(readlink -f result)" >> "$GITHUB_OUTPUT" 57 | 58 | - name: Upload Pages artifact 59 | uses: actions/upload-pages-artifact@v3 60 | with: 61 | path: ${{ steps.find-path.outputs.path }} 62 | 63 | deploy: 64 | name: Deploy website 65 | 66 | if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' 67 | needs: build 68 | 69 | runs-on: ubuntu-latest 70 | 71 | environment: 72 | name: github-pages 73 | url: ${{ steps.deploy.outputs.page_url }} 74 | 75 | permissions: 76 | id-token: write 77 | pages: write 78 | 79 | steps: 80 | - name: Deploy to GitHub Pages 81 | id: deploy 82 | uses: actions/deploy-pages@v4 83 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # mdbook artifacts 2 | **/book 3 | 4 | # nix artifacts 5 | result 6 | result-* 7 | repl-result-* 8 | gcroot/ 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Adding a port 4 | 5 | Create a file in `modules//` with the name of the port. All ports should have 6 | the `catppuccin.enable` and `catppuccin.flavor` options, and optionally the 7 | `catppuccin.accent` option. `catppuccin.flavor` and `catppuccin.accent` should 8 | default to `config.catppuccin.flavor` and `config.catppuccin.accent`, respectively. 9 | When you're done, make sure to add your new file to the list in 10 | `modules//all-modules.nix` 11 | 12 | Package can be auto-generated from our our upstream sources to use in modules. 13 | This allows us to easily access, build, and auto-update all themes reliably 14 | across systems. You can add a new port to this collection using a script in the 15 | `pkgs/` folder 16 | 17 | ```bash 18 | ./pkgs/paws.py port_name 19 | ``` 20 | Alternatively -- or if your port requires a build step -- you can make your own 21 | expression with `buildCatppuccinPort`. 22 | 23 | After creating your module, add the options to enable it in `test.nix` under the 24 | `nodes.machine` attrset. This will allow for your configuration to be tested along 25 | with the other modules in a VM automatically. 26 | 27 | 28 | Commits that add ports should be of the format 29 | 30 | ``` 31 | feat(): add support for 32 | ``` 33 | 34 | > **Note** 35 | > Unofficial ports will not be accepted; all sources must be from the 36 | > [Catppuccin](https://github.com/catppuccin) GitHub organization 37 | 38 | ## Commit messages 39 | 40 | This repository uses [Conventional Commits](https://conventionalcommits.org). 41 | Commit headers should be lowercase. Most commits should include a body that briefly 42 | describes the motivation and content of the commit. 43 | 44 | ### Commit types 45 | 46 | - `fix`: A bug fix that doesn't modify the public API 47 | - `feat`: A code change that modifies the public API 48 | - `refactor`: A code change that doesn't change behavior 49 | - `style`: A style fix or change 50 | - `docs`: Any change to documentation 51 | - `ci`: Any change to CI files 52 | - `revert`: A revert commit. The message should describe the reasoning and the 53 | commit should include the `Refs:` footer with the short hashes of the commits 54 | being reverted. 55 | - `chore`: catch-all type 56 | 57 | ### Commit scopes 58 | 59 | Available commit scopes are port names, `nixos`, `home-manager`, `modules`, 60 | `pkgs`, and `tests`. If none of these apply, omit the scope. 61 | 62 | ### Breaking changes 63 | 64 | All breaking changes should be documented in the commit footer in the format 65 | described by Conventional Commits. Use the `!` syntax in order to distinguish 66 | breaking commits in the log, but include the footer to provide a better description 67 | for the changelog generator. 68 | 69 | ``` 70 | feat(bar)!: foo the bars 71 | 72 | BREAKING CHANGE: bars are now foo'ed 73 | ``` 74 | 75 | ## For Maintainers 76 | 77 | Use squash merges when reasonable. They don't pollute the log with merge commits, and 78 | unlike rebase merges, list the author as the committer as well. 79 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Catppuccin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Logo
3 | 4 | Catppuccin for Nix 5 | 6 |

7 | 8 |

9 | 10 | 11 | 12 |

13 | 14 |

15 | 16 |

17 | 18 | ## Previews 19 | 20 |
21 | 🌻 Latte 22 | 23 |
24 |
25 | 🪴 Frappé 26 | 27 |
28 |
29 | 🌺 Macchiato 30 | 31 |
32 |
33 | 🌿 Mocha 34 | 35 |
36 | 37 | ## Usage 38 | 39 | You will probably want to see our [Getting started guide](http://nix.catppuccin.com/getting-started/index.html), but as a TLDR: 40 | 41 | 1. Import the [NixOS](https://nixos.org) and [home-manager](https://github.com/nix-community/home-manager) modules 42 | 43 |
44 | With Flakes 45 | 46 | ```nix 47 | { 48 | inputs = { 49 | nixpkgs.url = "nixpkgs/nixos-unstable"; 50 | catppuccin.url = "github:catppuccin/nix"; 51 | home-manager = { 52 | url = "github:nix-community/home-manager"; 53 | inputs.nixpkgs.follows = "nixpkgs"; 54 | }; 55 | }; 56 | 57 | outputs = { nixpkgs, catppuccin, home-manager }: { 58 | # for nixos module home-manager installations 59 | nixosConfigurations.pepperjacksComputer = pkgs.lib.nixosSystem { 60 | system = "x86_64-linux"; 61 | modules = [ 62 | catppuccin.nixosModules.catppuccin 63 | # if you use home-manager 64 | home-manager.nixosModules.home-manager 65 | 66 | { 67 | # if you use home-manager 68 | home-manager.users.pepperjack = { 69 | imports = [ 70 | ./home.nix 71 | catppuccin.homeModules.catppuccin 72 | ]; 73 | }; 74 | } 75 | ]; 76 | }; 77 | 78 | # for standalone home-manager installations 79 | homeConfigurations.pepperjack = home-manager.lib.homeManagerConfiguration { 80 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 81 | modules = [ 82 | ./home.nix 83 | catppuccin.homeModules.catppuccin 84 | ]; 85 | }; 86 | }; 87 | } 88 | ``` 89 | 90 |
91 | 92 |
93 | With Nix Channels 94 | 95 | ```bash 96 | sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager 97 | sudo nix-channel --add https://github.com/catppuccin/nix/archive/main.tar.gz catppuccin 98 | sudo nix-channel --update 99 | ``` 100 | 101 | For [NixOS module installations](https://nix-community.github.io/home-manager/index.html#sec-install-nixos-module): 102 | 103 | ```nix 104 | { 105 | imports = [ 106 | 107 | # if you use home-manager 108 | 109 | ]; 110 | 111 | # if you use home-manager 112 | home-manager.users.pepperjack = { 113 | imports = [ 114 | 115 | ]; 116 | }; 117 | } 118 | 119 | ``` 120 | 121 | For [standalone installations](https://nix-community.github.io/home-manager/index.html#sec-install-standalone) 122 | 123 | ```nix 124 | { 125 | imports = [ 126 | 127 | ]; 128 | 129 | home.username = "pepperjack"; 130 | programs.home-manager.enable = true; 131 | } 132 | ``` 133 | 134 |
135 | 136 | 2. In your configuration, choose your desired flavor with `catppuccin.flavor` 137 | 138 | ```nix 139 | { 140 | catppuccin.flavor = "mocha"; 141 | } 142 | ``` 143 | 144 | 3. Enable for supported programs 145 | 146 | ```nix 147 | { 148 | catppuccin.starship.enable = true; 149 | } 150 | ``` 151 | 152 | 4. Enable for all available programs you're using! 153 | 154 | ```nix 155 | { 156 | catppuccin.enable = true; 157 | } 158 | ``` 159 | 160 | ## 🙋 FAQ 161 | 162 | - Q: **"How do I know what programs are supported?"**\ 163 | A: You can find programs supported through home-manager [here](https://nix.catppuccin.com/search/rolling/?scope=home-manager+modules), 164 | and NixOS modules [here](https://nix.catppuccin.com/search/rolling/?scope=NixOS+modules) 165 | 166 | - Q: **"How do I set `catppuccin.enable` for everything I use?"**\ 167 | A: You can set `catppuccin.enable` globally through home-manager [here](https://nix.catppuccin.com/search/rolling/?option_scope=1&option=catppuccin.enable), 168 | and NixOS modules [here](https://nix.catppuccin.com/search/rolling/?option_scope=0&option=catppuccin.enable) 169 | 170 | - Q: **"What versions of NixOS and home-manager are supported?"**\ 171 | A: We primarily support the `unstable` branch, but try our best to support the current stable release. 172 | You can check if your stable release is currently supported at [status.nixos.org](https://status.nixos.org/) 173 | 174 | - Q: **"How do I fix the error: ... during evaluation because the option 'allow-import-from-derivation' is disabled"**\ 175 | A: Some ports need to read and/or manipulate remote resources, resulting in Nix performing [IFD](https://nix.dev/manual/nix/latest/language/import-from-derivation). 176 | We try to avoid this where possible, but sometimes we need to use it. Check out [our tracking issue](https://github.com/catppuccin/nix/issues/392) to see what ports are affected. 177 | 178 | - Q: **"How do I fix the error: a '...' with features {} is required to build '...'"?**\ 179 | A: See the above 180 | 181 | ## 💝 Thanks to 182 | 183 | - [Stonks3141](https://github.com/Stonks3141) 184 | - [getchoo](https://github.com/getchoo) 185 | 186 |   187 | 188 |

189 | 190 |

191 | 192 |

193 | Copyright © 2023-present Catppuccin Org 194 |

195 | 196 |

197 | 198 |

199 | -------------------------------------------------------------------------------- /assets/previews/frappe.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/nix/0ba11b12be81f0849a89ed17ab635164ea8f0112/assets/previews/frappe.webp -------------------------------------------------------------------------------- /assets/previews/latte.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/nix/0ba11b12be81f0849a89ed17ab635164ea8f0112/assets/previews/latte.webp -------------------------------------------------------------------------------- /assets/previews/macchiato.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/nix/0ba11b12be81f0849a89ed17ab635164ea8f0112/assets/previews/macchiato.webp -------------------------------------------------------------------------------- /assets/previews/mocha.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/nix/0ba11b12be81f0849a89ed17ab635164ea8f0112/assets/previews/mocha.webp -------------------------------------------------------------------------------- /assets/previews/preview.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/nix/0ba11b12be81f0849a89ed17ab635164ea8f0112/assets/previews/preview.webp -------------------------------------------------------------------------------- /cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | # 4 | # To bump the changelog: 5 | # 6 | # ```console 7 | # $ TAG="x.y.z" 8 | # $ TAG=v"$TAG" 9 | # $ git-cliff --github-token (gh auth token) --prepend CHANGELOG.md --tag "$TAG" --unreleased 10 | # ``` 11 | 12 | [changelog] 13 | header = """ 14 | # Changelog\n 15 | """ 16 | 17 | body = """ 18 | {% if version -%} 19 | ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/catppuccin/nix/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} 20 | {% else -%} 21 | ## [Unreleased] 22 | {% endif -%} 23 | 24 | {% for group, commits in commits | group_by(attribute="group") %} 25 | ### {{ group | striptags | trim | upper_first }} 26 | 27 | {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") -%} 28 | - **{{ commit.scope }}**: {{ commit.message | trim }}\ 29 | {%- if commit.remote.username %} by @{{ commit.remote.username }}{% endif %} 30 | {% endfor -%} 31 | 32 | {% for commit in commits -%} 33 | {% if commit.scope -%} 34 | {% else -%} 35 | - {{ commit.message | trim }}\ 36 | {% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %} 37 | {% endif -%} 38 | {% endfor -%} 39 | {% endfor -%} 40 | 41 | {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} 42 | ### New Contributors 43 | 44 | {% endif -%} 45 | 46 | {% for contributor in github.contributors | filter(attribute="username") | filter(attribute="is_first_time", value=true) | sort(attribute="username") -%} 47 | * @{{ contributor.username }} made their first contribution\ 48 | {% if contributor.pr_number %} in #{{ contributor.pr_number }}{% endif %} 49 | {% endfor %}\n 50 | """ 51 | 52 | footer = """ 53 | 54 | """ 55 | 56 | trim = true 57 | 58 | postprocessors = [ 59 | # Issues/PR 60 | { pattern = "#([0-9]+)", replace = "[#${1}](https://github.com/catppuccin/nix/issues/${1})" }, 61 | # Commits 62 | { pattern = "([a-f0-9]{7})", replace = "[${1}](https://github.com/catppuccin/nix/commit/${1})" }, 63 | # GitHub Users 64 | { pattern = " @([a-zA-Z0-9-_]+)", replace = " [@${1}](https://github.com/${1})" } 65 | ] 66 | 67 | [git] 68 | commit_preprocessors = [ 69 | # Remove issue numbers 70 | { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, 71 | ] 72 | 73 | commit_parsers = [ 74 | # This commit message isn't properly escaped 75 | { sha = "aa3a9816e9d6bc361ab1156f1e7a850fc0b5f4f8", skip = true }, 76 | 77 | # Ignore bot PRs 78 | { field = "author.name", pattern = "\\[bot\\]", skip = true }, 79 | 80 | # Ignore some commits not matched by the above 81 | { message = "^docs: update docs for( ([a-f0-9]{7}))?$", skip = true }, 82 | { message = "^style: format ([a-f0-9]{7})?$", skip = true }, 83 | 84 | # Regular matches 85 | { message = "^(.*)!:", group = "🚨 Breaking Changes" }, 86 | { message = "^feat", group = "🚀 Features" }, 87 | { message = "^fix", group = "🐛 Bug Fixes" }, 88 | { message = "^revert", group = " ⏪ Reverted"}, 89 | { message = "^docs", group = "📚 Documentation" }, 90 | ] 91 | 92 | filter_commits = true 93 | 94 | [remote.github] 95 | owner = "catppuccin" 96 | repo = "nix" 97 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import { 3 | inherit system; 4 | config = { }; 5 | overlays = [ ]; 6 | }, 7 | lib ? pkgs.lib, 8 | system ? builtins.currentSystem, 9 | }: 10 | 11 | let 12 | catppuccinPackages = 13 | let 14 | generated = lib.foldlAttrs ( 15 | acc: port: 16 | { 17 | rev, 18 | hash, 19 | lastModified, 20 | }: 21 | lib.recursiveUpdate acc { 22 | # Save our sources for each port 23 | sources.${port} = catppuccinPackages.fetchCatppuccinPort { inherit port rev hash; }; 24 | 25 | # And create a default package for them 26 | "${port}" = catppuccinPackages.buildCatppuccinPort { inherit port lastModified; }; 27 | } 28 | ) { } (lib.importJSON ./pkgs/sources.json); 29 | 30 | collected = lib.packagesFromDirectoryRecursive { 31 | callPackage = lib.callPackageWith (pkgs // catppuccinPackages); 32 | directory = ./pkgs; 33 | }; 34 | in 35 | generated // collected; 36 | in 37 | 38 | { 39 | # Filter out derivations not available on/meant for the current system 40 | packages = lib.filterAttrs (lib.const ( 41 | deriv: 42 | let 43 | # Only export packages available on the current system, *unless* they are being cross compiled 44 | availableOnHost = lib.meta.availableOn pkgs.stdenv.hostPlatform deriv; 45 | # `nix flake check` doesn't like broken packages 46 | broken = deriv.meta.broken or false; 47 | isCross = deriv.stdenv.buildPlatform != deriv.stdenv.targetPlatform; 48 | # Make sure we don't remove our functions 49 | isFunction = lib.isFunction deriv; 50 | in 51 | isFunction || (!broken) && availableOnHost || isCross 52 | )) catppuccinPackages; 53 | 54 | shell = import ./shell.nix { inherit pkgs; }; 55 | } 56 | -------------------------------------------------------------------------------- /dev/README.md: -------------------------------------------------------------------------------- 1 | > [!WARNING] 2 | > This is using features from Nix >= 2.26. 3 | > ***It will not evaluate on versions prior to 2.26***. 4 | > It is recommended to enter a shell with it by running `nix shell 'nixpkgs#nixVersions.nix_2_26'` 5 | -------------------------------------------------------------------------------- /dev/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "catppuccin": { 4 | "inputs": { 5 | "nixpkgs": "nixpkgs" 6 | }, 7 | "locked": { 8 | "path": "../.", 9 | "type": "path" 10 | }, 11 | "original": { 12 | "path": "../.", 13 | "type": "path" 14 | }, 15 | "parent": [] 16 | }, 17 | "catppuccin-v1_1": { 18 | "locked": { 19 | "lastModified": 1734055249, 20 | "narHash": "sha256-pCWJgwo77KD7EJpwynwKrWPZ//dwypHq2TfdzZWqK68=", 21 | "rev": "7221d6ca17ac36ed20588e1c3a80177ac5843fa7", 22 | "revCount": 326, 23 | "type": "tarball", 24 | "url": "https://api.flakehub.com/f/pinned/catppuccin/nix/1.1.1/0193bdc0-b045-7eed-bbec-95611a8ecdf5/source.tar.gz" 25 | }, 26 | "original": { 27 | "type": "tarball", 28 | "url": "https://flakehub.com/f/catppuccin/nix/1.1.%2A.tar.gz" 29 | } 30 | }, 31 | "catppuccin-v1_2": { 32 | "locked": { 33 | "lastModified": 1734734291, 34 | "narHash": "sha256-CFX4diEQHKvZYjnhf7TLg20m3ge1O4vqgplsk/Kuaek=", 35 | "rev": "1e4c3803b8da874ff75224ec8512cb173036bbd8", 36 | "revCount": 344, 37 | "type": "tarball", 38 | "url": "https://api.flakehub.com/f/pinned/catppuccin/nix/1.2.1/0193e646-1107-7f69-a402-f2a3988ecf1d/source.tar.gz" 39 | }, 40 | "original": { 41 | "type": "tarball", 42 | "url": "https://flakehub.com/f/catppuccin/nix/1.2.%2A.tar.gz" 43 | } 44 | }, 45 | "flake-utils": { 46 | "inputs": { 47 | "systems": "systems" 48 | }, 49 | "locked": { 50 | "lastModified": 1731533236, 51 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 52 | "owner": "numtide", 53 | "repo": "flake-utils", 54 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 55 | "type": "github" 56 | }, 57 | "original": { 58 | "owner": "numtide", 59 | "repo": "flake-utils", 60 | "type": "github" 61 | } 62 | }, 63 | "home-manager": { 64 | "inputs": { 65 | "nixpkgs": [ 66 | "nixpkgs" 67 | ] 68 | }, 69 | "locked": { 70 | "lastModified": 1744919155, 71 | "narHash": "sha256-IJksPW32V9gid9vDxoloJMRk+YGjxq5drFHBFeBkKU8=", 72 | "owner": "nix-community", 73 | "repo": "home-manager", 74 | "rev": "72526a5f7cde2ef9075637802a1e2a8d2d658f70", 75 | "type": "github" 76 | }, 77 | "original": { 78 | "owner": "nix-community", 79 | "repo": "home-manager", 80 | "type": "github" 81 | } 82 | }, 83 | "home-manager-stable": { 84 | "inputs": { 85 | "nixpkgs": [ 86 | "nixpkgs-stable" 87 | ] 88 | }, 89 | "locked": { 90 | "lastModified": 1744743431, 91 | "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", 92 | "owner": "nix-community", 93 | "repo": "home-manager", 94 | "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", 95 | "type": "github" 96 | }, 97 | "original": { 98 | "owner": "nix-community", 99 | "ref": "release-24.11", 100 | "repo": "home-manager", 101 | "type": "github" 102 | } 103 | }, 104 | "ixx": { 105 | "inputs": { 106 | "flake-utils": [ 107 | "nuscht-search", 108 | "flake-utils" 109 | ], 110 | "nixpkgs": [ 111 | "nuscht-search", 112 | "nixpkgs" 113 | ] 114 | }, 115 | "locked": { 116 | "lastModified": 1729958008, 117 | "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", 118 | "owner": "NuschtOS", 119 | "repo": "ixx", 120 | "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", 121 | "type": "github" 122 | }, 123 | "original": { 124 | "owner": "NuschtOS", 125 | "ref": "v0.0.6", 126 | "repo": "ixx", 127 | "type": "github" 128 | } 129 | }, 130 | "nixpkgs": { 131 | "locked": { 132 | "lastModified": 1744463964, 133 | "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", 134 | "owner": "NixOS", 135 | "repo": "nixpkgs", 136 | "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", 137 | "type": "github" 138 | }, 139 | "original": { 140 | "owner": "NixOS", 141 | "ref": "nixos-unstable", 142 | "repo": "nixpkgs", 143 | "type": "github" 144 | } 145 | }, 146 | "nixpkgs-stable": { 147 | "locked": { 148 | "lastModified": 1744440957, 149 | "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", 150 | "owner": "NixOS", 151 | "repo": "nixpkgs", 152 | "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", 153 | "type": "github" 154 | }, 155 | "original": { 156 | "owner": "NixOS", 157 | "ref": "nixos-24.11", 158 | "repo": "nixpkgs", 159 | "type": "github" 160 | } 161 | }, 162 | "nuscht-search": { 163 | "inputs": { 164 | "flake-utils": [ 165 | "flake-utils" 166 | ], 167 | "ixx": "ixx", 168 | "nixpkgs": [ 169 | "nixpkgs" 170 | ] 171 | }, 172 | "locked": { 173 | "lastModified": 1744375525, 174 | "narHash": "sha256-/Wf5Ca0DmV+y+qVBDXX8HAfAvSQI6y5oE27dv6t1jXk=", 175 | "owner": "NuschtOS", 176 | "repo": "search", 177 | "rev": "c0e7d3bda11e2cfad692d205d82757078475957a", 178 | "type": "github" 179 | }, 180 | "original": { 181 | "owner": "NuschtOS", 182 | "repo": "search", 183 | "type": "github" 184 | } 185 | }, 186 | "root": { 187 | "inputs": { 188 | "catppuccin": "catppuccin", 189 | "catppuccin-v1_1": "catppuccin-v1_1", 190 | "catppuccin-v1_2": "catppuccin-v1_2", 191 | "flake-utils": "flake-utils", 192 | "home-manager": "home-manager", 193 | "home-manager-stable": "home-manager-stable", 194 | "nixpkgs": [ 195 | "catppuccin", 196 | "nixpkgs" 197 | ], 198 | "nixpkgs-stable": "nixpkgs-stable", 199 | "nuscht-search": "nuscht-search" 200 | } 201 | }, 202 | "systems": { 203 | "locked": { 204 | "lastModified": 1681028828, 205 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 206 | "owner": "nix-systems", 207 | "repo": "default", 208 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 209 | "type": "github" 210 | }, 211 | "original": { 212 | "owner": "nix-systems", 213 | "repo": "default", 214 | "type": "github" 215 | } 216 | } 217 | }, 218 | "root": "root", 219 | "version": 7 220 | } 221 | -------------------------------------------------------------------------------- /dev/flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Development Flake for catppuccin/nix"; 3 | 4 | inputs = { 5 | # WARN: This handling of `path:` is a Nix 2.26 feature. The Flake won't work on versions prior to it 6 | # https://github.com/NixOS/nix/pull/10089 7 | catppuccin.url = "path:../."; 8 | nixpkgs.follows = "catppuccin/nixpkgs"; 9 | 10 | flake-utils.url = "github:numtide/flake-utils"; 11 | 12 | # Module versions we test against (aside from NixOS unstable) 13 | 14 | nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; 15 | 16 | home-manager = { 17 | url = "github:nix-community/home-manager"; 18 | inputs.nixpkgs.follows = "nixpkgs"; 19 | }; 20 | 21 | home-manager-stable = { 22 | url = "github:nix-community/home-manager/release-24.11"; 23 | inputs.nixpkgs.follows = "nixpkgs-stable"; 24 | }; 25 | 26 | # Our option search generator 27 | nuscht-search = { 28 | url = "github:NuschtOS/search"; 29 | inputs = { 30 | nixpkgs.follows = "nixpkgs"; 31 | flake-utils.follows = "flake-utils"; 32 | }; 33 | }; 34 | 35 | # Track some of our minor releases to index in said search 36 | 37 | catppuccin-v1_1 = { 38 | url = "https://flakehub.com/f/catppuccin/nix/1.1.*.tar.gz"; 39 | }; 40 | 41 | catppuccin-v1_2 = { 42 | url = "https://flakehub.com/f/catppuccin/nix/1.2.*.tar.gz"; 43 | }; 44 | }; 45 | 46 | outputs = 47 | { 48 | self, 49 | nixpkgs, 50 | catppuccin, 51 | ... 52 | }@inputs: 53 | 54 | let 55 | inherit (nixpkgs) lib; 56 | inherit (inputs.flake-utils.lib) eachDefaultSystem mkApp; 57 | 58 | mkApp' = drv: mkApp { inherit drv; }; 59 | 60 | # Versions of the modules we want to index in our search 61 | searchVersions = { 62 | "v1.1" = inputs.catppuccin-v1_1; 63 | "v1.2" = inputs.catppuccin-v1_2; 64 | "rolling" = catppuccin; 65 | }; 66 | in 67 | 68 | eachDefaultSystem ( 69 | system: 70 | 71 | let 72 | pkgs = nixpkgs.legacyPackages.${system}; 73 | pkgsStable = inputs.nixpkgs-stable.legacyPackages.${system}; 74 | 75 | kernelName = pkgs.stdenv.hostPlatform.parsed.kernel.name; 76 | 77 | callWith = pkgs: lib.flip pkgs.callPackage; 78 | callUnstable = callWith pkgs { inherit (inputs) home-manager; }; 79 | callStable = callWith pkgsStable { home-manager = inputs.home-manager-stable; }; 80 | in 81 | 82 | { 83 | apps = { 84 | serve = mkApp' self.packages.${system}.site.serve; 85 | }; 86 | 87 | checks = 88 | { 89 | darwin = { 90 | test-unstable = callUnstable (catppuccin + "/modules/tests/darwin.nix"); 91 | test-stable = callStable (catppuccin + "/modules/tests/darwin.nix"); 92 | }; 93 | 94 | linux = { 95 | test-unstable = callUnstable (catppuccin + "/modules/tests/nixos.nix"); 96 | test-stable = callStable (catppuccin + "/modules/tests/nixos.nix"); 97 | }; 98 | } 99 | .${kernelName} or { }; 100 | 101 | packages = { 102 | # Used in CI 103 | all-ports = pkgs.linkFarm "all-ports" ( 104 | lib.foldlAttrs ( 105 | acc: name: pkg: 106 | if pkg ? "outPath" then 107 | acc 108 | // { 109 | ${name} = pkg.outPath; 110 | } 111 | else 112 | acc 113 | ) { } (lib.removeAttrs catppuccin.packages.${system} [ "default" ]) 114 | ); 115 | 116 | site = pkgs.callPackage (catppuccin + "/docs/package.nix") { 117 | inherit inputs searchVersions; 118 | nuscht-search = inputs.nuscht-search.packages.${system}; 119 | }; 120 | }; 121 | } 122 | ); 123 | } 124 | -------------------------------------------------------------------------------- /docs/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | title = "catppuccin/nix" 3 | authors = ["getchoo"] 4 | description = "Soothing pastel theme for Nix" 5 | language = "en" 6 | multilingual = false 7 | src = "src" 8 | 9 | [output.html] 10 | default-theme = "mocha" 11 | preferred-dark-theme = "mocha" 12 | additional-css = ["./theme/catppuccin.css"] 13 | no-section-label = true 14 | git-repository-url = "https://github.com/catppuccin/nix" 15 | git-repository-icon = "fa-github" 16 | cname = "nix.catppuccin.com" 17 | -------------------------------------------------------------------------------- /docs/mk-search.nix: -------------------------------------------------------------------------------- 1 | { mkMultiSearch, pkgs }: 2 | 3 | { catppuccin, versionName }: 4 | 5 | let 6 | urlPrefix = "https://github.com/catppuccin/nix/tree/${catppuccin.rev or "main"}/"; 7 | in 8 | 9 | mkMultiSearch { 10 | title = "catppuccin/nix Option Search"; 11 | baseHref = "/search/${versionName}/"; 12 | 13 | scopes = [ 14 | { 15 | name = "NixOS modules"; 16 | modules = [ 17 | catppuccin.nixosModules.catppuccin 18 | { _module.args = { inherit pkgs; }; } 19 | ]; 20 | inherit urlPrefix; 21 | } 22 | { 23 | name = "home-manager modules"; 24 | modules = [ 25 | catppuccin.homeManagerModules.catppuccin 26 | { _module.args = { inherit pkgs; }; } 27 | ]; 28 | inherit urlPrefix; 29 | } 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /docs/mk-site.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenvNoCC, 4 | mdbook, 5 | python3, 6 | writeShellApplication, 7 | }: 8 | 9 | args: 10 | 11 | stdenvNoCC.mkDerivation ( 12 | finalAttrs: 13 | args 14 | // { 15 | nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [ mdbook ]; 16 | 17 | dontConfigure = true; 18 | doCheck = false; 19 | 20 | buildPhase = '' 21 | runHook preBuild 22 | mdbook build 23 | runHook postBuild 24 | ''; 25 | 26 | installPhase = '' 27 | runHook preInstall 28 | mv book $out 29 | runHook postInstall 30 | ''; 31 | 32 | passthru = lib.recursiveUpdate (args.passthru or { }) { 33 | serve = writeShellApplication { 34 | name = "serve"; 35 | 36 | runtimeInputs = [ python3 ]; 37 | 38 | text = '' 39 | python -m http.server --bind 127.0.0.1 --directory ${finalAttrs.finalPackage} 40 | ''; 41 | }; 42 | }; 43 | } 44 | ) 45 | -------------------------------------------------------------------------------- /docs/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | callPackage, 4 | linkFarm, 5 | writeText, 6 | 7 | nuscht-search, 8 | inputs, 9 | /* 10 | Should be in the format of 11 | 12 | ``` 13 | { 14 | = ; 15 | } 16 | ``` 17 | 18 | i.e., 19 | 20 | ``` 21 | { 22 | "v1.1" = catppuccin_v1_1; 23 | "rolling" = catppuccin; 24 | } 25 | */ 26 | searchVersions ? null, 27 | }: 28 | 29 | assert lib.assertMsg ( 30 | searchVersions != null 31 | ) "./docs/package.nix: `searchVersions` must be provided"; 32 | 33 | let 34 | inherit (inputs) catppuccin; 35 | 36 | mkSite = callPackage ./mk-site.nix { }; 37 | mkSearchInstance = callPackage ./mk-search.nix { 38 | inherit (nuscht-search) mkMultiSearch; 39 | }; 40 | 41 | # Collect the latest stable version from the `searchVersions` given 42 | latestStableVersion = 43 | let 44 | latest = lib.foldl' ( 45 | latest: versionName: 46 | if (versionName != "rolling" && lib.versionOlder latest (lib.removePrefix "v" versionName)) then 47 | versionName 48 | else 49 | latest 50 | ) "0" (lib.attrNames searchVersions); 51 | in 52 | assert lib.assertMsg (latest != "0") "Unable to determine latest stable version!"; 53 | latest; 54 | 55 | # Then create a search instance for each one 56 | searchInstances = lib.mapAttrs ( 57 | versionName: catppuccin: mkSearchInstance { inherit catppuccin versionName; } 58 | ) searchVersions; 59 | 60 | # Create an html page for redirecting to a given endpoint 61 | redirectTo = 62 | endpoint: 63 | writeText "index.html" '' 64 | 65 | ''; 66 | in 67 | 68 | mkSite { 69 | pname = "catppuccin-nix-site"; 70 | version = catppuccin.shortRev or catppuccin.dirtyShortRev or "unknown"; 71 | 72 | src = catppuccin + "/docs"; 73 | 74 | postPatch = "ln -sf ${catppuccin + "/CHANGELOG.md"} src/NEWS.md"; 75 | 76 | postInstall = '' 77 | ln -sf ${ 78 | linkFarm "search-engines" ( 79 | [ 80 | { 81 | name = "stable.html"; 82 | path = redirectTo "/search/${latestStableVersion}/"; 83 | } 84 | { 85 | name = "index.html"; 86 | path = redirectTo "/search/stable.html"; 87 | } 88 | ] 89 | ++ lib.mapAttrsToList (name: path: { inherit name path; }) searchInstances 90 | ) 91 | } $out/search 92 | ''; 93 | } 94 | -------------------------------------------------------------------------------- /docs/src/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | `catppuccin/nix` is an open source, [MIT licensed](https://github.com/catppuccin/nix/blob/main/LICENSE) project. Contributions - including bug reports, feature requests, and improvements - can be made on our [GitHub repository](https://github.com/catppuccin/nix). 4 | 5 | If you are interested in hacking away at our modules, make sure to read our [Contributing guidelines](https://github.com/catppuccin/nix/blob/main/CONTRIBUTING.md) 6 | -------------------------------------------------------------------------------- /docs/src/README.md: -------------------------------------------------------------------------------- 1 | # catppuccin/nix 2 | 3 | *The soothing pastel theme - now for Nix!* 4 | 5 | Built on top of [NixOS](https://nixos.org) and [home-manager](https://github.com/nix-community/home-manager), `catppuccin/nix` allows you to easily use Catppuccin across all of your apps! 6 | 7 | ## What you'll find here 8 | 9 | You should first check out our [Getting started](getting-started) guide. Once you're done, you can [take a look](options.md) at all of our available options. 10 | 11 | ## Find a problem? 12 | 13 | Feel free to [open an issue!](https://github.com/catppuccin/nix/issues/new) 14 | -------------------------------------------------------------------------------- /docs/src/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | [Introduction](README.md) 4 | 5 | - [Getting started](getting-started/README.md) 6 | - [Stable Nix](getting-started/stable-nix.md) 7 | - [Flakes](getting-started/flakes.md) 8 | 9 | - [Module options](options.md) 10 | 11 | - [FAQ](faq.md) 12 | 13 | - [Changelog](NEWS.md) 14 | 15 | - [Contributing](CONTRIBUTING.md) 16 | -------------------------------------------------------------------------------- /docs/src/faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | - Q: **"How do I know what programs are supported?"**\ 4 | A: You can find programs supported through home-manager [here](https://nix.catppuccin.com/search/rolling/?scope=home-manager+modules), 5 | and NixOS modules [here](https://nix.catppuccin.com/search/rolling/?scope=NixOS+modules) 6 | 7 | - Q: **"How do I set `catppuccin.enable` for everything I use?"**\ 8 | A: You can set `catppuccin.enable` globally through home-manager [here](https://nix.catppuccin.com/search/rolling/?option_scope=1&option=catppuccin.enable), 9 | and NixOS modules [here](https://nix.catppuccin.com/search/rolling/?option_scope=0&option=catppuccin.enable) 10 | 11 | - Q: **"What versions of NixOS and home-manager are supported?"**\ 12 | A: We primarily support the `unstable` branch, but try our best to support the current stable release. 13 | You can check if your stable release is currently supported at [status.nixos.org](https://status.nixos.org/) 14 | 15 | - Q: **"How do I fix the error: ... during evaluation because the option 'allow-import-from-derivation' is disabled"**\ 16 | A: Some ports need to read and/or manipulate remote resources, resulting in Nix performing [IFD](https://nix.dev/manual/nix/latest/language/import-from-derivation). 17 | 18 |
19 | Disable modules that use IFD 20 | 21 | ```nix 22 | { 23 | catppuccin = { 24 | cava.enable = false; 25 | gh-dash.enable = false; 26 | imv.enable = false; 27 | swaylock.enable = false; 28 | mako.enable = false; 29 | }; 30 | } 31 | ``` 32 |
33 | -------------------------------------------------------------------------------- /docs/src/getting-started/README.md: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | `catppuccin/nix` supports both stable Nix and [Flakes](https://wiki.nixos.org/wiki/Flakes)! Select one of the options below based on what you want to use. 4 | 5 | - [Stable Nix](stable-nix.md) 6 | - [Flakes](flakes.md) 7 | -------------------------------------------------------------------------------- /docs/src/getting-started/flakes.md: -------------------------------------------------------------------------------- 1 | # Flakes 2 | 3 | Flakes are the preferred way to to use `catppuccin/nix` and will be the easiest method for those with them enabled 4 | 5 | 6 | First, we need to add this project to our inputs so we can use it in our configurations: 7 | 8 | ```nix 9 | { 10 | inputs = { 11 | nixpkgs.url = "nixpkgs/nixos-unstable"; 12 | catppuccin.url = "github:catppuccin/nix"; 13 | }; 14 | } 15 | ``` 16 | 17 | After, we can use them in a NixOS configuration like so 18 | 19 | ```nix 20 | { 21 | nixosConfigurations.pepperjacksComputer = { 22 | system = "x86_64-linux"; 23 | 24 | modules = [ 25 | catppuccin.nixosModules.catppuccin 26 | # if you use home-manager 27 | home-manager.nixosModules.home-manager 28 | 29 | { 30 | # if you use home-manager 31 | home-manager.users.pepperjack = { 32 | imports = [ 33 | ./home.nix 34 | catppuccin.homeManagerModules.catppuccin 35 | ]; 36 | }; 37 | } 38 | ]; 39 | }; 40 | } 41 | ``` 42 | 43 | or if you use a [standalone installation](https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone) of `home-manager` 44 | 45 | ```nix 46 | { 47 | homeConfigurations.pepperjack = home-manager.lib.homeManagerConfiguration { 48 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 49 | modules = [ 50 | ./home.nix 51 | catppuccin.homeManagerModules.catppuccin 52 | ]; 53 | }; 54 | } 55 | ``` 56 | 57 | By the end, you should have a flake.nix that looks something like this 58 | ```nix 59 | { 60 | inputs = { 61 | nixpkgs.url = "nixpkgs/nixos-unstable"; 62 | catppuccin.url = "github:catppuccin/nix"; 63 | home-manager = { 64 | url = "github:nix-community/home-manager"; 65 | inputs.nixpkgs.follows = "nixpkgs"; 66 | }; 67 | }; 68 | 69 | outputs = { nixpkgs, catppuccin, home-manager }: { 70 | # for nixos module home-manager installations 71 | nixosConfigurations.pepperjacksComputer = pkgs.lib.nixosSystem { 72 | system = "x86_64-linux"; 73 | modules = [ 74 | catppuccin.nixosModules.catppuccin 75 | # if you use home-manager 76 | home-manager.nixosModules.home-manager 77 | 78 | { 79 | # if you use home-manager 80 | home-manager.users.pepperjack = { 81 | imports = [ 82 | ./home.nix 83 | catppuccin.homeManagerModules.catppuccin 84 | ]; 85 | }; 86 | } 87 | ]; 88 | }; 89 | 90 | # for standalone home-manager installations 91 | homeConfigurations.pepperjack = home-manager.lib.homeManagerConfiguration { 92 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 93 | modules = [ 94 | ./home.nix 95 | catppuccin.homeManagerModules.catppuccin 96 | ]; 97 | }; 98 | }; 99 | } 100 | ```` 101 | -------------------------------------------------------------------------------- /docs/src/getting-started/stable-nix.md: -------------------------------------------------------------------------------- 1 | # Stable Nix 2 | 3 | When using stable Nix, we have a couple options for installing `catppuccin/nix` 4 | 5 | ## With `npins` 6 | 7 | [`npins`](https://github.com/andir/npins) provides a way to easily ["pin"](https://nix.dev/tutorials/first-steps/towards-reproducibility-pinning-nixpkgs) and update external dependencies for your configurations. 8 | 9 | Assuming you have followed [their getting started guide](https://github.com/andir/npins#getting-started), you can run the following: 10 | 11 | ```sh 12 | npins add --name catppuccin github catppuccin nix 13 | ``` 14 | 15 | And in your system configuration: 16 | 17 | ```nix 18 | let 19 | sources = import ./npins; 20 | in 21 | { 22 | imports = [ 23 | (sources.catppuccin + "/modules/nixos") 24 | ]; 25 | 26 | # if you use home-manager 27 | home-manager.users.pepperjack = { 28 | imports = [ 29 | (sources.catppuccin + "/modules/home-manager") 30 | ]; 31 | }; 32 | } 33 | ``` 34 | 35 | or if you use a [standalone installation](https://nix-community.github.io/home-manager/index.html#sec-install-standalone) of `home-manager` 36 | 37 | ```nix 38 | let 39 | sources = import ./npins.nix; 40 | in 41 | { 42 | imports = [ 43 | (sources.catppuccin + "/modules/home-manager") 44 | ]; 45 | 46 | home.username = "pepperjack"; 47 | programs.home-manager.enable = true; 48 | } 49 | 50 | ``` 51 | 52 | ## With channels 53 | 54 | [Nix channels](https://nixos.org/manual/nix/stable/command-ref/nix-channel.html) provide a way for you to easily download, update, and use our modules -- though at the cost of reproducibility across machines. 55 | 56 | To add `catppuccin/nix` as a channel, you can run the following: 57 | 58 | 59 | ```sh 60 | sudo nix-channel --add https://github.com/catppuccin/nix/archive/main.tar.gz catppuccin 61 | sudo nix-channel --update 62 | ``` 63 | 64 | And in your system configuration: 65 | 66 | ```nix 67 | { 68 | imports = [ 69 | 70 | ]; 71 | 72 | # if you use home-manager 73 | home-manager.users.pepperjack = { 74 | imports = [ 75 | 76 | ]; 77 | }; 78 | } 79 | ``` 80 | 81 | or if you use a [standalone installation](https://nix-community.github.io/home-manager/index.html#sec-install-standalone) of `home-manager` 82 | 83 | ```nix 84 | { 85 | imports = [ 86 | 87 | ]; 88 | 89 | home.username = "pepperjack"; 90 | programs.home-manager.enable = true; 91 | } 92 | 93 | ``` 94 | 95 | -------------------------------------------------------------------------------- /docs/src/options.md: -------------------------------------------------------------------------------- 1 | # Module Options 2 | 3 | We provide a search engine for the different supported versions of catppuccin/nix: 4 | 5 | - [v1.1](/search/v1.1) 6 | - [v1.2](/search/v1.2) 7 | - [rolling](/search/rolling) (`main` branch on GitHub) 8 | 9 | If you have any issues with this documentation, don't hesitate to [open an issue](https://github.com/catppuccin/nix/issues/new). 10 | -------------------------------------------------------------------------------- /docs/theme/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | {{#if is_print }} 8 | 9 | {{/if}} 10 | {{#if base_url}} 11 | 12 | {{/if}} 13 | 14 | 15 | 16 | {{> head}} 17 | 18 | 19 | 20 | 21 | 22 | {{#if favicon_svg}} 23 | 24 | {{/if}} 25 | {{#if favicon_png}} 26 | 27 | {{/if}} 28 | 29 | 30 | 31 | {{#if print_enable}} 32 | 33 | {{/if}} 34 | 35 | 36 | 37 | {{#if copy_fonts}} 38 | 39 | {{/if}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | {{#each additional_css}} 48 | 49 | {{/each}} 50 | 51 | {{#if mathjax_support}} 52 | 53 | 54 | {{/if}} 55 | 56 | 57 | 61 | 62 | 63 | 64 | 65 |
66 | 67 | 81 | 82 | 83 | 92 | 93 | 94 | 95 | 96 | 109 | 110 | 120 | 121 |
122 | 123 |
124 | {{> header}} 125 | 126 | 168 | 169 | {{#if search_enabled}} 170 | 180 | {{/if}} 181 | 182 | 183 | 190 | 191 |
192 |
193 | {{{ content }}} 194 |
195 | 196 | 212 |
213 |
214 | 215 | 228 | 229 |
230 | 231 | {{#if live_reload_endpoint}} 232 | 233 | 248 | {{/if}} 249 | 250 | {{#if google_analytics}} 251 | 252 | 267 | {{/if}} 268 | 269 | {{#if playground_line_numbers}} 270 | 273 | {{/if}} 274 | 275 | {{#if playground_copyable}} 276 | 279 | {{/if}} 280 | 281 | {{#if playground_js}} 282 | 283 | 284 | 285 | 286 | 287 | {{/if}} 288 | 289 | {{#if search_js}} 290 | 291 | 292 | 293 | {{/if}} 294 | 295 | 296 | 297 | 298 | 299 | 300 | {{#each additional_js}} 301 | 302 | {{/each}} 303 | 304 | {{#if is_print}} 305 | {{#if mathjax_support}} 306 | 313 | {{else}} 314 | 319 | {{/if}} 320 | {{/if}} 321 | 322 |
323 | 324 | 325 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1744463964, 6 | "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", 7 | "owner": "NixOS", 8 | "repo": "nixpkgs", 9 | "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "NixOS", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs" 22 | } 23 | } 24 | }, 25 | "root": "root", 26 | "version": 7 27 | } 28 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Soothing pastel theme for Nix"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | }; 7 | 8 | outputs = 9 | { self, nixpkgs }: 10 | 11 | let 12 | inherit (nixpkgs) lib; 13 | 14 | # Systems for public outputs 15 | systems = lib.systems.flakeExposed; 16 | 17 | # Systems for development related outputs 18 | # (that evaluate more exotic packages cleanly, unlike some systems above) 19 | devSystems = [ 20 | "x86_64-linux" 21 | "aarch64-linux" 22 | "x86_64-darwin" 23 | "aarch64-darwin" 24 | ]; 25 | 26 | forAllSystems = lib.genAttrs systems; 27 | forAllDevSystems = lib.genAttrs devSystems; 28 | 29 | mkModule = 30 | { 31 | name ? "catppuccin", 32 | type, 33 | file, 34 | }: 35 | { pkgs, ... }: 36 | { 37 | _file = "${self.outPath}/flake.nix#${type}Modules.${name}"; 38 | 39 | imports = [ file ]; 40 | 41 | catppuccin.sources = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}; 42 | }; 43 | in 44 | 45 | { 46 | packages = forAllSystems ( 47 | system: 48 | let 49 | pkgs = nixpkgs.legacyPackages.${system}; 50 | catppuccinPackages = (import ./default.nix { inherit pkgs; }).packages; 51 | in 52 | catppuccinPackages 53 | // { 54 | default = catppuccinPackages.whiskers; 55 | } 56 | ); 57 | 58 | devShells = forAllDevSystems (system: { 59 | default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.${system}; }; 60 | }); 61 | 62 | formatter = forAllDevSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style); 63 | 64 | # TODO: Remove before 2.0 is stable 65 | homeManagerModules = lib.mapAttrs ( 66 | name: 67 | lib.warn "Obsolete Flake attribute `catppuccin.homeManagerModules.${name}' is used. It was renamed to `catppuccin.homeModules.${name}`'." 68 | ) self.homeModules; 69 | 70 | homeModules = { 71 | default = self.homeModules.catppuccin; 72 | catppuccin = mkModule { 73 | type = "homeManager"; 74 | file = ./modules/home-manager; 75 | }; 76 | }; 77 | 78 | nixosModules = { 79 | default = self.nixosModules.catppuccin; 80 | catppuccin = mkModule { 81 | type = "nixos"; 82 | file = ./modules/nixos; 83 | }; 84 | }; 85 | }; 86 | } 87 | -------------------------------------------------------------------------------- /modules/global.nix: -------------------------------------------------------------------------------- 1 | { catppuccinModules }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | catppuccinLib = import ./lib { inherit config lib pkgs; }; 11 | in 12 | 13 | { 14 | config = { 15 | assertions = [ (catppuccinLib.assertMinimumVersion "24.11") ]; 16 | }; 17 | 18 | imports = catppuccinLib.applyToModules catppuccinModules; 19 | 20 | options.catppuccin = { 21 | enable = lib.mkEnableOption "Catppuccin globally"; 22 | 23 | flavor = lib.mkOption { 24 | type = catppuccinLib.types.flavor; 25 | default = "mocha"; 26 | description = "Global Catppuccin flavor"; 27 | }; 28 | 29 | accent = lib.mkOption { 30 | type = catppuccinLib.types.accent; 31 | default = "mauve"; 32 | description = "Global Catppuccin accent"; 33 | }; 34 | 35 | sources = 36 | let 37 | defaultSources = (import ../default.nix { inherit pkgs; }).packages; 38 | in 39 | lib.mkOption { 40 | type = lib.types.lazyAttrsOf lib.types.raw; 41 | default = defaultSources; 42 | defaultText = "{ ... }"; 43 | # HACK! 44 | # without this, overriding one source will delete all others. -@getchoo 45 | apply = lib.recursiveUpdate defaultSources; 46 | description = "Port sources used across all options"; 47 | }; 48 | 49 | cache.enable = lib.mkEnableOption "the usage of Catppuccin's binary cache"; 50 | }; 51 | 52 | config = { 53 | nix.settings = lib.mkIf config.catppuccin.cache.enable { 54 | substituters = [ "https://catppuccin.cachix.org" ]; 55 | trusted-public-keys = [ "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" ]; 56 | }; 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /modules/home-manager/aerc.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.aerc; 7 | themeName = "catppuccin-${cfg.flavor}"; 8 | in 9 | 10 | { 11 | options.catppuccin.aerc = catppuccinLib.mkCatppuccinOption { name = "aerc"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "aerc" 17 | "catppuccin" 18 | ]; 19 | to = "aerc"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.aerc = { 24 | stylesets.${themeName} = lib.fileContents "${sources.aerc}/${themeName}"; 25 | extraConfig = { 26 | ui = { 27 | styleset-name = themeName; 28 | border-char-vertical = "│"; 29 | border-char-horizontal = "─"; 30 | }; 31 | }; 32 | }; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /modules/home-manager/alacritty.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.alacritty; 7 | in 8 | 9 | { 10 | options.catppuccin.alacritty = catppuccinLib.mkCatppuccinOption { name = "alacritty"; }; 11 | 12 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 13 | from = [ 14 | "programs" 15 | "alacritty" 16 | "catppuccin" 17 | ]; 18 | to = "alacritty"; 19 | }; 20 | 21 | config = lib.mkIf cfg.enable { 22 | programs.alacritty = { 23 | settings.general.import = lib.mkBefore [ "${sources.alacritty}/catppuccin-${cfg.flavor}.toml" ]; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/home-manager/all-modules.nix: -------------------------------------------------------------------------------- 1 | [ 2 | ./aerc.nix 3 | ./alacritty.nix 4 | ./atuin.nix 5 | ./bat.nix 6 | ./bottom.nix 7 | ./btop.nix 8 | ./cava.nix 9 | ./chrome.nix 10 | ./cursors.nix 11 | ./delta.nix 12 | ./dunst.nix 13 | ./fcitx5.nix 14 | ./fish.nix 15 | ./foot.nix 16 | ./freetube.nix 17 | ./fuzzel.nix 18 | ./fzf.nix 19 | ./gh-dash.nix 20 | ./gitui.nix 21 | ./ghostty.nix 22 | ./glamour.nix 23 | ./gtk.nix 24 | ./helix.nix 25 | ./hyprland.nix 26 | ./hyprlock.nix 27 | ./imv.nix 28 | ./k9s.nix 29 | ./kitty.nix 30 | ./kvantum.nix 31 | ./lazygit.nix 32 | ./lsd.nix 33 | ./newsboat.nix 34 | ./nushell.nix 35 | ./mako.nix 36 | ./micro.nix 37 | ./mpv.nix 38 | ./neovim.nix 39 | ./obs.nix 40 | ./polybar.nix 41 | ./qutebrowser.nix 42 | ./rio.nix 43 | ./rofi.nix 44 | ./skim.nix 45 | ./spotify-player.nix 46 | ./starship.nix 47 | ./swaylock.nix 48 | ./sway.nix 49 | ./swaync.nix 50 | ./thunderbird.nix 51 | ./tmux.nix 52 | ./tofi.nix 53 | ./vscode.nix 54 | ./waybar.nix 55 | ./wezterm.nix 56 | ./wlogout.nix 57 | ./yazi.nix 58 | ./zathura.nix 59 | ./zed-editor.nix 60 | ./zellij.nix 61 | ./zsh-syntax-highlighting.nix 62 | ./sioyek.nix 63 | ] 64 | -------------------------------------------------------------------------------- /modules/home-manager/atuin.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.atuin; 7 | enable = cfg.enable && config.programs.atuin.enable; 8 | themeName = "catppuccin-${cfg.flavor}-${cfg.accent}"; 9 | in 10 | 11 | { 12 | options.catppuccin.atuin = catppuccinLib.mkCatppuccinOption { 13 | name = "atuin"; 14 | accentSupport = true; 15 | }; 16 | 17 | config = lib.mkIf enable { 18 | programs.atuin = { 19 | settings.theme.name = themeName; 20 | }; 21 | 22 | xdg.configFile = { 23 | "atuin/themes/${themeName}.toml".source = "${sources.atuin}/${cfg.flavor}/${themeName}.toml"; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/home-manager/bat.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.bat; 7 | themeName = "Catppuccin ${catppuccinLib.mkUpper cfg.flavor}"; 8 | in 9 | 10 | { 11 | options.catppuccin.bat = catppuccinLib.mkCatppuccinOption { name = "bat"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "bat" 17 | "catppuccin" 18 | ]; 19 | to = "bat"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.bat = { 24 | config.theme = themeName; 25 | 26 | themes.${themeName} = { 27 | src = sources.bat; 28 | file = "${themeName}.tmTheme"; 29 | }; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/home-manager/bottom.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.bottom; 7 | in 8 | 9 | { 10 | options.catppuccin.bottom = catppuccinLib.mkCatppuccinOption { name = "bottom"; }; 11 | 12 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 13 | from = [ 14 | "programs" 15 | "bottom" 16 | "catppuccin" 17 | ]; 18 | to = "bottom"; 19 | }; 20 | 21 | config = lib.mkIf cfg.enable { 22 | programs.bottom = { 23 | settings = lib.importTOML "${sources.bottom}/${cfg.flavor}.toml"; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/home-manager/btop.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.btop; 8 | enable = cfg.enable && config.programs.btop.enable; 9 | 10 | themeFile = "catppuccin_${cfg.flavor}.theme"; 11 | theme = sources.btop + "/${themeFile}"; 12 | in 13 | 14 | { 15 | options.catppuccin.btop = catppuccinLib.mkCatppuccinOption { name = "btop"; }; 16 | 17 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 18 | from = [ 19 | "programs" 20 | "btop" 21 | "catppuccin" 22 | ]; 23 | to = "btop"; 24 | }; 25 | 26 | config = lib.mkIf enable { 27 | xdg.configFile = { 28 | "btop/themes/${themeFile}".source = theme; 29 | }; 30 | 31 | programs.btop = { 32 | settings = { 33 | color_theme = themeFile; 34 | }; 35 | }; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /modules/home-manager/cava.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.cava; 8 | flavor = "${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent"; 9 | in 10 | 11 | { 12 | options.catppuccin.cava = catppuccinLib.mkCatppuccinOption { name = "cava"; } // { 13 | transparent = lib.mkEnableOption "transparent version of flavor"; 14 | }; 15 | 16 | imports = 17 | (catppuccinLib.mkRenamedCatppuccinOptions { 18 | from = [ 19 | "programs" 20 | "cava" 21 | "catppuccin" 22 | ]; 23 | to = "cava"; 24 | }) 25 | ++ [ 26 | (lib.mkRenamedOptionModule 27 | [ 28 | "programs" 29 | "cava" 30 | "catppuccin" 31 | "transparent" 32 | ] 33 | [ 34 | "catppuccin" 35 | "cava" 36 | "transparent" 37 | ] 38 | ) 39 | ]; 40 | 41 | config = lib.mkIf cfg.enable { 42 | programs.cava = { 43 | settings = catppuccinLib.importINIRaw (sources.cava + "/${flavor}.cava"); 44 | }; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /modules/home-manager/chrome.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | let 4 | cfg = config.catppuccin; 5 | 6 | identifiers = { 7 | frappe = "olhelnoplefjdmncknfphenjclimckaf"; 8 | latte = "jhjnalhegpceacdhbplhnakmkdliaddd"; 9 | macchiato = "cmpdlhmnmjhihmcfnigoememnffkimlk"; 10 | mocha = "bkkmolkhemgaeaeggcmfbghljjjoofoh"; 11 | }; 12 | 13 | # Google Chrome is not supported since it does not support extensions 14 | # See nix-community/home-manager#1383 for more information. 15 | supportedBrowsers = [ 16 | "brave" 17 | "chromium" 18 | "vivaldi" 19 | ]; 20 | 21 | generateConfig = 22 | browser: 23 | lib.mkIf cfg.${browser}.enable { 24 | programs.${browser}.extensions = [ { id = identifiers.${cfg.${browser}.flavor}; } ]; 25 | }; 26 | in 27 | { 28 | options.catppuccin = lib.genAttrs supportedBrowsers ( 29 | name: catppuccinLib.mkCatppuccinOption { inherit name; } 30 | ); 31 | 32 | config = lib.mkMerge (map generateConfig supportedBrowsers); 33 | } 34 | -------------------------------------------------------------------------------- /modules/home-manager/cursors.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | inherit (config.catppuccin) sources; 10 | 11 | cfg = config.catppuccin.cursors; 12 | 13 | # "dark" and "light" can be used alongside the regular accents 14 | cursorAccentType = catppuccinLib.mergeEnums catppuccinLib.types.accent ( 15 | lib.types.enum [ 16 | "dark" 17 | "light" 18 | ] 19 | ); 20 | in 21 | 22 | { 23 | options.catppuccin.cursors = 24 | catppuccinLib.mkCatppuccinOption { 25 | name = "pointer cursors"; 26 | # NOTE: We exclude this as there is no `enable` option in the upstream 27 | # module to guard it 28 | useGlobalEnable = false; 29 | } 30 | // { 31 | accent = lib.mkOption { 32 | type = cursorAccentType; 33 | default = config.catppuccin.accent; 34 | description = "Catppuccin accent for pointer cursors"; 35 | }; 36 | }; 37 | 38 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 39 | from = [ 40 | "catppuccin" 41 | "pointerCursor" 42 | ]; 43 | to = "cursors"; 44 | accentSupport = true; 45 | }; 46 | 47 | config = lib.mkIf cfg.enable { 48 | home.pointerCursor = { 49 | name = "catppuccin-${cfg.flavor}-${cfg.accent}-cursors"; 50 | package = sources.cursors; 51 | }; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /modules/home-manager/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | _class = "homeManager"; 5 | 6 | imports = [ 7 | (lib.modules.importApply ../global.nix { catppuccinModules = import ./all-modules.nix; }) 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /modules/home-manager/delta.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.delta; 8 | enable = cfg.enable && config.programs.git.delta.enable; 9 | in 10 | 11 | { 12 | options.catppuccin.delta = catppuccinLib.mkCatppuccinOption { name = "delta"; }; 13 | 14 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 15 | from = [ 16 | "programs" 17 | "git" 18 | "delta" 19 | "catppuccin" 20 | ]; 21 | to = "delta"; 22 | }; 23 | 24 | config = lib.mkIf enable { 25 | programs.git = { 26 | includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ]; 27 | delta.options.features = "catppuccin-${cfg.flavor}"; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/home-manager/dunst.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.dunst; 8 | enable = cfg.enable && config.services.dunst.enable; 9 | in 10 | 11 | { 12 | options.catppuccin.dunst = catppuccinLib.mkCatppuccinOption { name = "dunst"; } // { 13 | prefix = lib.mkOption { 14 | type = lib.types.str; 15 | default = "00"; 16 | description = "Prefix to use for the dunst drop-in file"; 17 | }; 18 | }; 19 | 20 | imports = 21 | (catppuccinLib.mkRenamedCatppuccinOptions { 22 | from = [ 23 | "services" 24 | "dunst" 25 | "catppuccin" 26 | ]; 27 | to = "dunst"; 28 | }) 29 | ++ [ 30 | (lib.mkRenamedOptionModule 31 | [ 32 | "services" 33 | "dunst" 34 | "catppuccin" 35 | "prefix" 36 | ] 37 | [ 38 | "catppuccin" 39 | "dunst" 40 | "prefix" 41 | ] 42 | ) 43 | ]; 44 | 45 | # Dunst currently has no "include" functionality, but has "drop-ins" 46 | # Unfortunately, this may cause inconvenience as it overrides ~/.config/dunst/dunstrc 47 | # but it can be overridden by another drop-in. 48 | config = lib.mkIf enable { 49 | xdg.configFile = { 50 | # Using a prefix like this is necessary because drop-ins' precedence depends on lexical order 51 | # such that later drop-ins override earlier ones 52 | # This way, users have better control over precedence 53 | "dunst/dunstrc.d/${cfg.prefix}-catppuccin.conf".source = sources.dunst + "/${cfg.flavor}.conf"; 54 | }; 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /modules/home-manager/fcitx5.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.fcitx5; 8 | enable = 9 | cfg.enable 10 | && ( 11 | ( 12 | config.i18n.inputMethod ? enable 13 | && config.i18n.inputMethod.enable 14 | && config.i18n.inputMethod.type == "fcitx5" 15 | ) 16 | || config.i18n.inputMethod.enabled == "fcitx5" 17 | ); 18 | in 19 | 20 | { 21 | options.catppuccin.fcitx5 = 22 | catppuccinLib.mkCatppuccinOption { 23 | name = "Fcitx5"; 24 | accentSupport = true; 25 | } 26 | // { 27 | apply = lib.mkOption { 28 | type = lib.types.bool; 29 | default = true; 30 | description = '' 31 | Applies the theme by overwriting `$XDG_CONFIG_HOME/fcitx5/conf/classicui.conf`. 32 | If this is disabled, you must manually set the theme (e.g. by using `fcitx5-configtool`). 33 | ''; 34 | }; 35 | }; 36 | 37 | imports = 38 | (catppuccinLib.mkRenamedCatppuccinOptions { 39 | from = [ 40 | "i18n" 41 | "inputMethod" 42 | "fcitx5" 43 | "catppuccin" 44 | ]; 45 | to = "fcitx5"; 46 | accentSupport = true; 47 | }) 48 | ++ [ 49 | (lib.mkRenamedOptionModule 50 | [ 51 | "i18n" 52 | "inputMethod" 53 | "fcitx5" 54 | "catppuccin" 55 | "apply" 56 | ] 57 | [ 58 | "catppuccin" 59 | "fcitx5" 60 | "apply" 61 | ] 62 | ) 63 | ]; 64 | 65 | config = lib.mkIf enable { 66 | xdg.dataFile = { 67 | "fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}" = { 68 | source = "${sources.fcitx5}/share/fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}"; 69 | recursive = true; 70 | }; 71 | }; 72 | 73 | xdg.configFile = { 74 | "fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply { 75 | text = lib.generators.toINIWithGlobalSection { } { 76 | globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}"; 77 | }; 78 | }; 79 | }; 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /modules/home-manager/fish.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.fish; 8 | enable = cfg.enable && config.programs.fish.enable; 9 | 10 | themeName = "Catppuccin ${catppuccinLib.mkUpper cfg.flavor}"; 11 | in 12 | 13 | { 14 | options.catppuccin.fish = catppuccinLib.mkCatppuccinOption { name = "fish"; }; 15 | 16 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 17 | from = [ 18 | "programs" 19 | "fish" 20 | "catppuccin" 21 | ]; 22 | to = "fish"; 23 | }; 24 | 25 | config = lib.mkIf enable { 26 | xdg.configFile."fish/themes/${themeName}.theme".source = "${sources.fish}/${themeName}.theme"; 27 | 28 | programs.fish.shellInit = '' 29 | fish_config theme choose "${themeName}" 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/home-manager/foot.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.foot; 8 | in 9 | 10 | { 11 | options.catppuccin.foot = catppuccinLib.mkCatppuccinOption { name = "foot"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "foot" 17 | "catppuccin" 18 | ]; 19 | to = "foot"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.foot = { 24 | settings = { 25 | main.include = sources.foot + "/catppuccin-${cfg.flavor}.ini"; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/home-manager/freetube.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (catppuccinLib) mkUpper; 6 | inherit (config.programs.freetube.settings) baseTheme; 7 | 8 | cfg = config.catppuccin.freetube; 9 | in 10 | 11 | { 12 | options.catppuccin.freetube = 13 | catppuccinLib.mkCatppuccinOption { 14 | name = "freetube"; 15 | accentSupport = true; 16 | } 17 | // { 18 | # FreeTube supports two accent colors 19 | secondaryAccent = lib.mkOption { 20 | type = catppuccinLib.types.accent; 21 | # Have the secondary accent default to FreeTube's main accent rather than the global Catppuccin accent 22 | # This assumes most users would prefer both accent colors to be the same when only overriding the main one 23 | default = cfg.accent; 24 | description = "Secondary accent for freetube"; 25 | }; 26 | }; 27 | 28 | imports = 29 | (catppuccinLib.mkRenamedCatppuccinOptions { 30 | from = [ 31 | "programs" 32 | "freetube" 33 | "catppuccin" 34 | ]; 35 | to = "freetube"; 36 | accentSupport = true; 37 | }) 38 | ++ [ 39 | (lib.mkRenamedOptionModule 40 | [ 41 | "programs" 42 | "freetube" 43 | "catppuccin" 44 | "secondaryAccent" 45 | ] 46 | [ 47 | "catppuccin" 48 | "freetube" 49 | "secondaryAccent" 50 | ] 51 | ) 52 | ]; 53 | 54 | config = lib.mkIf cfg.enable { 55 | programs.freetube.settings = { 56 | # NOTE: For some reason, baseTheme does not capitalize first letter, but the other settings do 57 | baseTheme = "catppuccin${mkUpper cfg.flavor}"; 58 | mainColor = mkUpper "${baseTheme}${mkUpper cfg.accent}"; 59 | secColor = mkUpper "${baseTheme}${mkUpper cfg.secondaryAccent}"; 60 | }; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /modules/home-manager/fuzzel.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.fuzzel; 8 | in 9 | 10 | { 11 | options.catppuccin.fuzzel = catppuccinLib.mkCatppuccinOption { 12 | name = "fuzzel"; 13 | accentSupport = true; 14 | }; 15 | 16 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 17 | from = [ 18 | "programs" 19 | "fuzzel" 20 | "catppuccin" 21 | ]; 22 | to = "fuzzel"; 23 | accentSupport = true; 24 | }; 25 | 26 | config = lib.mkIf cfg.enable { 27 | programs.fuzzel = { 28 | settings = { 29 | main.include = sources.fuzzel + "/catppuccin-${cfg.flavor}/${cfg.accent}.ini"; 30 | }; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/home-manager/fzf.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.fzf; 8 | palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; 9 | 10 | # Manually populate with colors from catppuccin/fzf 11 | # The ordering is meant to match the order of catppuccin/fzf to make comparison easier 12 | colors = lib.attrsets.mapAttrs (_: color: palette.${color}.hex) { 13 | "bg+" = "surface0"; 14 | bg = "base"; 15 | spinner = "rosewater"; 16 | hl = cfg.accent; 17 | fg = "text"; 18 | header = cfg.accent; 19 | info = cfg.accent; 20 | pointer = cfg.accent; 21 | marker = cfg.accent; 22 | "fg+" = "text"; 23 | prompt = cfg.accent; 24 | "hl+" = cfg.accent; 25 | }; 26 | in 27 | 28 | { 29 | options.catppuccin.fzf = catppuccinLib.mkCatppuccinOption { 30 | name = "fzf"; 31 | accentSupport = true; 32 | }; 33 | 34 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 35 | from = [ 36 | "programs" 37 | "fzf" 38 | "catppuccin" 39 | ]; 40 | to = "fzf"; 41 | accentSupport = true; 42 | }; 43 | 44 | config = lib.mkIf cfg.enable { 45 | programs.fzf = { 46 | inherit colors; 47 | }; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /modules/home-manager/gh-dash.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.gh-dash; 8 | theme = "${sources.gh-dash}/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.yml"; 9 | in 10 | 11 | { 12 | options.catppuccin.gh-dash = catppuccinLib.mkCatppuccinOption { 13 | name = "gh-dash"; 14 | accentSupport = true; 15 | }; 16 | 17 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 18 | from = [ 19 | "programs" 20 | "gh-dash" 21 | "catppuccin" 22 | ]; 23 | to = "gh-dash"; 24 | accentSupport = true; 25 | }; 26 | 27 | config = lib.mkIf cfg.enable { 28 | programs.gh-dash = { 29 | settings = catppuccinLib.importYAML theme; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/home-manager/ghostty.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.ghostty; 8 | themeName = "catppuccin-${cfg.flavor}"; 9 | enable = cfg.enable && config.programs.ghostty.enable; 10 | in 11 | { 12 | options.catppuccin.ghostty = catppuccinLib.mkCatppuccinOption { name = "ghostty"; }; 13 | 14 | config = lib.mkIf enable { 15 | xdg.configFile = { 16 | "ghostty/themes/${themeName}".source = "${sources.ghostty}/${themeName}.conf"; 17 | }; 18 | 19 | programs.ghostty = { 20 | settings = { 21 | theme = "light:${themeName},dark:${themeName}"; 22 | }; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /modules/home-manager/gitui.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.gitui; 8 | in 9 | 10 | { 11 | options.catppuccin.gitui = catppuccinLib.mkCatppuccinOption { name = "gitui"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "gitui" 17 | "catppuccin" 18 | ]; 19 | to = "gitui"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.gitui.theme = builtins.path { 24 | name = "${cfg.flavor}.ron"; 25 | path = "${sources.gitui}/catppuccin-${cfg.flavor}.ron"; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /modules/home-manager/glamour.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.glamour; 8 | in 9 | 10 | { 11 | options.catppuccin.glamour = catppuccinLib.mkCatppuccinOption { name = "glamour"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "glamour" 17 | "catppuccin" 18 | ]; 19 | to = "glamour"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | home.sessionVariables = { 24 | GLAMOUR_STYLE = "${sources.glamour}/catppuccin-${cfg.flavor}.json"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/home-manager/gtk.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (lib) 11 | concatStringsSep 12 | mkEnableOption 13 | mkIf 14 | mkMerge 15 | mkOption 16 | mkRenamedOptionModule 17 | types 18 | ; 19 | 20 | cfg = config.catppuccin.gtk; 21 | enable = cfg.enable && config.gtk.enable; 22 | in 23 | 24 | { 25 | options.catppuccin.gtk = 26 | catppuccinLib.mkCatppuccinOption { 27 | name = "gtk"; 28 | useGlobalEnable = false; 29 | 30 | accentSupport = true; 31 | } 32 | // { 33 | size = mkOption { 34 | type = types.enum [ 35 | "standard" 36 | "compact" 37 | ]; 38 | default = "standard"; 39 | description = "Catppuccin size variant for gtk"; 40 | }; 41 | 42 | tweaks = mkOption { 43 | type = types.listOf ( 44 | types.enum [ 45 | "black" 46 | "rimless" 47 | "normal" 48 | "float" 49 | ] 50 | ); 51 | default = [ ]; 52 | description = "Catppuccin tweaks for gtk"; 53 | }; 54 | 55 | gnomeShellTheme = mkEnableOption "Catppuccin gtk theme for GNOME Shell"; 56 | 57 | icon = catppuccinLib.mkCatppuccinOption { 58 | name = "GTK modified Papirus icon theme"; 59 | # NOTE: we exclude this from the global `catppuccin.enable` as there is no 60 | # `enable` option in the upstream module to guard it 61 | default = false; 62 | 63 | accentSupport = true; 64 | }; 65 | }; 66 | 67 | imports = 68 | (catppuccinLib.mkRenamedCatppuccinOptions { 69 | from = [ 70 | "gtk" 71 | "catppuccin" 72 | ]; 73 | to = "gtk"; 74 | accentSupport = true; 75 | }) 76 | ++ (catppuccinLib.mkRenamedCatppuccinOptions { 77 | from = [ 78 | "gtk" 79 | "catppuccin" 80 | "cursor" 81 | ]; 82 | to = "cursors"; 83 | accentSupport = true; 84 | }) 85 | ++ [ 86 | (mkRenamedOptionModule 87 | [ 88 | "gtk" 89 | "catppuccin" 90 | "size" 91 | ] 92 | [ 93 | "catppuccin" 94 | "gtk" 95 | "size" 96 | ] 97 | ) 98 | 99 | (mkRenamedOptionModule 100 | [ 101 | "gtk" 102 | "catppuccin" 103 | "tweaks" 104 | ] 105 | [ 106 | "catppuccin" 107 | "gtk" 108 | "tweaks" 109 | ] 110 | ) 111 | 112 | (mkRenamedOptionModule 113 | [ 114 | "gtk" 115 | "catppuccin" 116 | "gnomeShellTheme" 117 | ] 118 | [ 119 | "catppuccin" 120 | "gtk" 121 | "gnomeShellTheme" 122 | ] 123 | ) 124 | 125 | (mkRenamedOptionModule 126 | [ 127 | "gtk" 128 | "catppuccin" 129 | "icon" 130 | ] 131 | [ 132 | "catppuccin" 133 | "gtk" 134 | "icon" 135 | ] 136 | ) 137 | ]; 138 | 139 | config = mkMerge [ 140 | (mkIf (enable || cfg.gnomeShellTheme) { 141 | warnings = [ 142 | '' 143 | `gtk.catppuccin.enable` and `gtk.catppuccin.gnomeShellTheme` are deprecated and will be removed in a future release. 144 | 145 | The upstream port has been archived and support will no longer be provided. 146 | Please see https://github.com/catppuccin/gtk/issues/262 147 | '' 148 | ]; 149 | }) 150 | 151 | (mkIf enable { 152 | gtk.theme = 153 | let 154 | gtkTweaks = concatStringsSep "," cfg.tweaks; 155 | in 156 | { 157 | name = 158 | "catppuccin-${cfg.flavor}-${cfg.accent}-${cfg.size}+" 159 | + (if (cfg.tweaks == [ ]) then "default" else gtkTweaks); 160 | package = config.catppuccin.sources.gtk.override { 161 | inherit (cfg) flavor size tweaks; 162 | accents = [ cfg.accent ]; 163 | }; 164 | }; 165 | 166 | xdg.configFile = 167 | let 168 | gtk4Dir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0"; 169 | in 170 | { 171 | "gtk-4.0/assets".source = "${gtk4Dir}/assets"; 172 | "gtk-4.0/gtk.css".source = "${gtk4Dir}/gtk.css"; 173 | "gtk-4.0/gtk-dark.css".source = "${gtk4Dir}/gtk-dark.css"; 174 | }; 175 | }) 176 | 177 | (mkIf cfg.icon.enable { 178 | gtk.iconTheme = 179 | let 180 | # use the light icon theme for latte 181 | polarity = if cfg.icon.flavor == "latte" then "Light" else "Dark"; 182 | in 183 | { 184 | name = "Papirus-${polarity}"; 185 | package = pkgs.catppuccin-papirus-folders.override { inherit (cfg.icon) accent flavor; }; 186 | }; 187 | }) 188 | 189 | (mkIf cfg.gnomeShellTheme { 190 | assertions = [ 191 | { 192 | assertion = enable; 193 | message = "`gtk.enable` and `gtk.catppuccin.enable` must be `true` to use the GNOME shell theme"; 194 | } 195 | ]; 196 | 197 | home.packages = [ pkgs.gnomeExtensions.user-themes ]; 198 | 199 | dconf.settings = { 200 | "org/gnome/shell" = { 201 | disable-user-extensions = false; 202 | enabled-extensions = [ "user-theme@gnome-shell-extensions.gcampax.github.com" ]; 203 | }; 204 | "org/gnome/shell/extensions/user-theme" = { 205 | inherit (config.gtk.theme) name; 206 | }; 207 | "org/gnome/desktop/interface" = { 208 | color-scheme = if cfg.flavor == "latte" then "default" else "prefer-dark"; 209 | }; 210 | }; 211 | }) 212 | ]; 213 | } 214 | -------------------------------------------------------------------------------- /modules/home-manager/helix.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.helix; 8 | enable = cfg.enable && config.programs.helix.enable; 9 | subdir = if cfg.useItalics then "default" else "no_italics"; 10 | in 11 | 12 | { 13 | options.catppuccin.helix = catppuccinLib.mkCatppuccinOption { name = "helix"; } // { 14 | useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix"; 15 | }; 16 | 17 | imports = 18 | (catppuccinLib.mkRenamedCatppuccinOptions { 19 | from = [ 20 | "programs" 21 | "helix" 22 | "catppuccin" 23 | ]; 24 | to = "helix"; 25 | }) 26 | ++ [ 27 | (lib.mkRenamedOptionModule 28 | [ 29 | "programs" 30 | "helix" 31 | "catppuccin" 32 | "useItalics" 33 | ] 34 | [ 35 | "catppuccin" 36 | "helix" 37 | "useItalics" 38 | ] 39 | ) 40 | ]; 41 | 42 | config = lib.mkIf enable { 43 | programs.helix = { 44 | settings = { 45 | theme = "catppuccin-${cfg.flavor}"; 46 | editor.color-modes = lib.mkDefault true; 47 | }; 48 | }; 49 | 50 | xdg.configFile = { 51 | "helix/themes/catppuccin-${cfg.flavor}.toml".source = 52 | "${sources.helix}/${subdir}/catppuccin_${cfg.flavor}.toml"; 53 | }; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /modules/home-manager/hyprland.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources cursors; 11 | cfg = config.catppuccin.hyprland; 12 | enable = cfg.enable && config.wayland.windowManager.hyprland.enable; 13 | in 14 | 15 | { 16 | options.catppuccin.hyprland = catppuccinLib.mkCatppuccinOption { 17 | name = "hyprland"; 18 | accentSupport = true; 19 | }; 20 | 21 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 22 | from = [ 23 | "wayland" 24 | "windowManager" 25 | "hyprland" 26 | "catppuccin" 27 | ]; 28 | to = "hyprland"; 29 | accentSupport = true; 30 | }; 31 | 32 | config = lib.mkIf enable { 33 | home.sessionVariables = lib.mkIf cursors.enable { 34 | HYPRCURSOR_SIZE = config.home.pointerCursor.size; 35 | HYPRCURSOR_THEME = "catppuccin-${cursors.flavor}-${cursors.accent}-cursors"; 36 | }; 37 | 38 | wayland.windowManager.hyprland = { 39 | settings = { 40 | source = [ 41 | "${sources.hyprland}/${cfg.flavor}.conf" 42 | 43 | # Define accents in file to ensure they appear before user vars 44 | (pkgs.writeText "hyprland-${cfg.accent}-accent.conf" '' 45 | $accent = ''$${cfg.accent} 46 | $accentAlpha = ''$${cfg.accent}Alpha 47 | '') 48 | ]; 49 | }; 50 | }; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /modules/home-manager/hyprlock.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | 12 | cfg = config.catppuccin.hyprlock; 13 | in 14 | 15 | { 16 | options.catppuccin.hyprlock = 17 | catppuccinLib.mkCatppuccinOption { 18 | name = "hyprlock"; 19 | accentSupport = true; 20 | } 21 | // { 22 | useDefaultConfig = lib.mkEnableOption "the default configuration of the port" // { 23 | default = true; 24 | }; 25 | }; 26 | 27 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 28 | from = [ 29 | "programs" 30 | "hyprlock" 31 | "catppuccin" 32 | ]; 33 | to = "hyprlock"; 34 | accentSupport = true; 35 | }; 36 | 37 | config = lib.mkIf cfg.enable { 38 | programs.hyprlock = { 39 | settings = { 40 | source = [ 41 | "${sources.hyprland}/${cfg.flavor}.conf" 42 | 43 | # Define accents in file to ensure they appear before user vars 44 | (pkgs.writeText "hyprland-${cfg.accent}-accent.conf" '' 45 | $accent = ''$${cfg.accent} 46 | $accentAlpha = ''$${cfg.accent}Alpha 47 | '') 48 | ] ++ lib.optional cfg.useDefaultConfig sources.hyprlock; 49 | }; 50 | }; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /modules/home-manager/imv.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.imv; 8 | in 9 | 10 | { 11 | options.catppuccin.imv = catppuccinLib.mkCatppuccinOption { name = "imv"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "imv" 17 | "catppuccin" 18 | ]; 19 | to = "imv"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.imv = { 24 | settings = catppuccinLib.importINI (sources.imv + "/${cfg.flavor}.config"); 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/home-manager/k9s.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | 12 | cfg = config.catppuccin.k9s; 13 | enable = cfg.enable && config.programs.k9s.enable; 14 | 15 | # NOTE: On MacOS specifically, k9s expects its configuration to be in 16 | # `~/Library/Application Support` when not using XDG 17 | enableXdgConfig = !pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable; 18 | 19 | themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent"; 20 | themeFile = "${themeName}.yaml"; 21 | themePath = "k9s/skins/${themeFile}"; 22 | theme = sources.k9s + "/${themeFile}"; 23 | in 24 | 25 | { 26 | options.catppuccin.k9s = catppuccinLib.mkCatppuccinOption { name = "k9s"; } // { 27 | transparent = lib.mkEnableOption "transparent version of flavor"; 28 | }; 29 | 30 | imports = 31 | (catppuccinLib.mkRenamedCatppuccinOptions { 32 | from = [ 33 | "programs" 34 | "k9s" 35 | "catppuccin" 36 | ]; 37 | to = "k9s"; 38 | }) 39 | ++ [ 40 | (lib.mkRenamedOptionModule 41 | [ 42 | "programs" 43 | "k9s" 44 | "catppuccin" 45 | "transparent" 46 | ] 47 | [ 48 | "catppuccin" 49 | "k9s" 50 | "transparent" 51 | ] 52 | ) 53 | ]; 54 | 55 | config = lib.mkIf enable ( 56 | lib.mkMerge [ 57 | (lib.mkIf (!enableXdgConfig) { 58 | home.file = { 59 | "Library/Application Support/${themePath}".source = theme; 60 | }; 61 | }) 62 | 63 | (lib.mkIf enableXdgConfig { xdg.configFile.${themePath}.source = theme; }) 64 | 65 | { 66 | programs.k9s = { 67 | settings = { 68 | k9s.ui.skin = themeName; 69 | }; 70 | }; 71 | } 72 | ] 73 | ); 74 | } 75 | -------------------------------------------------------------------------------- /modules/home-manager/kitty.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | cfg = config.catppuccin.kitty; 6 | in 7 | 8 | { 9 | options.catppuccin.kitty = catppuccinLib.mkCatppuccinOption { name = "kitty"; }; 10 | 11 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 12 | from = [ 13 | "programs" 14 | "kitty" 15 | "catppuccin" 16 | ]; 17 | to = "kitty"; 18 | }; 19 | 20 | config = lib.mkIf cfg.enable { 21 | programs.kitty = { 22 | themeFile = "Catppuccin-${catppuccinLib.mkUpper cfg.flavor}"; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /modules/home-manager/kvantum.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.catppuccin.kvantum; 10 | enable = cfg.enable && config.qt.enable; 11 | 12 | themeName = "catppuccin-${cfg.flavor}-${cfg.accent}"; 13 | in 14 | 15 | { 16 | options.catppuccin.kvantum = 17 | catppuccinLib.mkCatppuccinOption { 18 | name = "Kvantum"; 19 | accentSupport = true; 20 | } 21 | // { 22 | apply = lib.mkOption { 23 | type = lib.types.bool; 24 | default = true; 25 | description = '' 26 | Applies the theme by overwriting `$XDG_CONFIG_HOME/Kvantum/kvantum.kvconfig`. 27 | If this is disabled, you must manually set the theme (e.g. by using `kvantummanager`). 28 | ''; 29 | }; 30 | }; 31 | 32 | imports = 33 | (catppuccinLib.mkRenamedCatppuccinOptions { 34 | from = [ 35 | "qt" 36 | "style" 37 | "catppuccin" 38 | ]; 39 | to = "kvantum"; 40 | accentSupport = true; 41 | }) 42 | ++ [ 43 | (lib.mkRenamedOptionModule 44 | [ 45 | "qt" 46 | "style" 47 | "catppuccin" 48 | "apply" 49 | ] 50 | [ 51 | "catppuccin" 52 | "kvantum" 53 | "apply" 54 | ] 55 | ) 56 | ]; 57 | 58 | config = lib.mkIf enable { 59 | assertions = [ 60 | { 61 | assertion = lib.elem config.qt.style.name [ 62 | "kvantum" 63 | "Kvantum" 64 | ]; 65 | message = ''`qt.style.name` must be `"kvantum"` to use `qt.style.catppuccin`''; 66 | } 67 | { 68 | assertion = lib.elem (config.qt.platformTheme.name or null) [ "kvantum" ]; 69 | message = ''`qt.platformTheme.name` must be set to `"kvantum"` to use `qt.style.catppuccin`''; 70 | } 71 | ]; 72 | 73 | xdg.configFile = { 74 | "Kvantum/${themeName}".source = "${config.catppuccin.sources.kvantum}/share/Kvantum/${themeName}"; 75 | "Kvantum/kvantum.kvconfig" = lib.mkIf cfg.apply { 76 | text = '' 77 | [General] 78 | theme=${themeName} 79 | ''; 80 | }; 81 | }; 82 | }; 83 | } 84 | -------------------------------------------------------------------------------- /modules/home-manager/lazygit.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.lazygit; 7 | in 8 | 9 | { 10 | options.catppuccin.lazygit = catppuccinLib.mkCatppuccinOption { 11 | name = "lazygit"; 12 | accentSupport = true; 13 | }; 14 | 15 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 16 | from = [ 17 | "programs" 18 | "lazygit" 19 | "catppuccin" 20 | ]; 21 | to = "lazygit"; 22 | accentSupport = true; 23 | }; 24 | 25 | config = lib.mkIf cfg.enable { 26 | # TODO: Find a way to "source" a config file with $LG_CONFIG_FILE 27 | # and *not* come across https://github.com/catppuccin/nix/issues/455 28 | # https://github.com/jesseduffield/lazygit/blob/4b4d82e13c568f3b43c018740132454446cb0a2e/docs/Config.md#overriding-default-config-file-location 29 | programs.lazygit.settings = catppuccinLib.importYAML (sources.lazygit + "/${cfg.flavor}/${cfg.accent}.yml"); 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/home-manager/lsd.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.lsd; 8 | enable = cfg.enable && config.programs.lsd.enable; 9 | in 10 | 11 | { 12 | options.catppuccin.lsd = catppuccinLib.mkCatppuccinOption { name = "lsd"; }; 13 | 14 | config = lib.mkIf enable { 15 | xdg.configFile = { 16 | "lsd/colors.yaml".source = "${sources.lsd}/catppuccin-${cfg.flavor}/colors.yaml"; 17 | }; 18 | programs.lsd.settings.color.theme = "custom"; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/home-manager/mako.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | pkgs, 5 | lib, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | 12 | cfg = config.catppuccin.mako; 13 | theme = catppuccinLib.importINI ( 14 | sources.mako + "/catppuccin-${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}" 15 | ); 16 | 17 | # Settings that need to be extracted and put in extraConfig 18 | extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme; 19 | in 20 | 21 | { 22 | options.catppuccin.mako = catppuccinLib.mkCatppuccinOption { 23 | name = "mako"; 24 | accentSupport = true; 25 | }; 26 | 27 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 28 | from = [ 29 | "services" 30 | "mako" 31 | "catppuccin" 32 | ]; 33 | to = "mako"; 34 | accentSupport = true; 35 | }; 36 | 37 | # Will cause infinite recursion if config.services.mako is directly set as a whole 38 | config.services.mako = lib.mkIf cfg.enable ( 39 | if (config.services.mako ? settings) then 40 | { 41 | settings = theme; 42 | } 43 | else 44 | { 45 | backgroundColor = theme.background-color; 46 | textColor = theme.text-color; 47 | borderColor = theme.border-color; 48 | progressColor = theme.progress-color; 49 | extraConfig = lib.fileContents ( 50 | (pkgs.formats.ini { }).generate "mako-extra-config" extraConfigAttrs 51 | ); 52 | } 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /modules/home-manager/micro.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.micro; 8 | enable = cfg.enable && config.programs.micro.enable; 9 | 10 | themePath = 11 | "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent" + ".micro"; 12 | in 13 | 14 | { 15 | options.catppuccin.micro = catppuccinLib.mkCatppuccinOption { name = "micro"; } // { 16 | transparent = lib.mkEnableOption "transparent version of flavor"; 17 | }; 18 | 19 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 20 | from = [ 21 | "programs" 22 | "micro" 23 | "catppuccin" 24 | ]; 25 | to = "micro"; 26 | }; 27 | 28 | config = lib.mkIf enable { 29 | programs.micro = { 30 | settings = { 31 | colorscheme = lib.removeSuffix ".micro" themePath; 32 | }; 33 | }; 34 | 35 | xdg.configFile = { 36 | "micro/colorschemes/${themePath}".source = "${sources.micro}/${themePath}"; 37 | }; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /modules/home-manager/mpv.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.mpv; 8 | in 9 | 10 | { 11 | options.catppuccin.mpv = catppuccinLib.mkCatppuccinOption { 12 | name = "mpv"; 13 | accentSupport = true; 14 | }; 15 | 16 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 17 | from = [ 18 | "programs" 19 | "mpv" 20 | "catppuccin" 21 | ]; 22 | to = "mpv"; 23 | accentSupport = true; 24 | }; 25 | 26 | config = lib.mkIf cfg.enable { 27 | programs.mpv = { 28 | config = { 29 | include = sources.mpv + "/${cfg.flavor}/${cfg.accent}.conf"; 30 | }; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/home-manager/neovim.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | let 4 | cfg = config.catppuccin.nvim; 5 | 6 | defaultConfig = { 7 | compile_path = lib.generators.mkLuaInline "compile_path"; 8 | flavour = cfg.flavor; 9 | }; 10 | in 11 | { 12 | options.catppuccin.nvim = catppuccinLib.mkCatppuccinOption { name = "neovim"; } // { 13 | settings = lib.mkOption { 14 | description = "Extra settings that will be passed to the setup function."; 15 | default = { }; 16 | type = lib.types.submodule { freeformType = lib.types.attrsOf lib.types.anything; }; 17 | apply = lib.recursiveUpdate defaultConfig; 18 | }; 19 | }; 20 | 21 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 22 | from = [ 23 | "programs" 24 | "neovim" 25 | "catppuccin" 26 | ]; 27 | to = "nvim"; 28 | }; 29 | 30 | config = lib.mkIf cfg.enable { 31 | programs.neovim = { 32 | plugins = [ 33 | { 34 | plugin = config.catppuccin.sources.nvim; 35 | config = '' 36 | lua << EOF 37 | local compile_path = vim.fn.stdpath("cache") .. "/catppuccin-nvim" 38 | vim.fn.mkdir(compile_path, "p") 39 | vim.opt.runtimepath:append(compile_path) 40 | 41 | require("catppuccin").setup(${lib.generators.toLua { } cfg.settings}) 42 | 43 | vim.api.nvim_command("colorscheme catppuccin") 44 | EOF 45 | ''; 46 | } 47 | ]; 48 | }; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /modules/home-manager/newsboat.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.newsboat; 8 | theme = if cfg.flavor == "latte" then "latte" else "dark"; 9 | in 10 | 11 | { 12 | options.catppuccin.newsboat = catppuccinLib.mkCatppuccinOption { name = "newsboat"; }; 13 | 14 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 15 | from = [ 16 | "programs" 17 | "newsboat" 18 | "catppuccin" 19 | ]; 20 | to = "newsboat"; 21 | }; 22 | 23 | config = lib.mkIf cfg.enable { 24 | programs.newsboat = { 25 | extraConfig = lib.fileContents "${sources.newsboat}/${theme}"; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /modules/home-manager/nushell.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.nushell; 8 | in 9 | 10 | { 11 | options.catppuccin.nushell = catppuccinLib.mkCatppuccinOption { name = "nushell"; }; 12 | 13 | config = lib.mkIf cfg.enable { 14 | programs.nushell = { 15 | extraConfig = lib.mkBefore '' 16 | source ${sources.nushell + "/catppuccin_${cfg.flavor}.nu"} 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/home-manager/obs.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.obs; 8 | enable = cfg.enable && config.programs.obs-studio.enable; 9 | 10 | themeName = "Catppuccin_${catppuccinLib.mkUpper cfg.flavor}.ovt"; 11 | in 12 | 13 | { 14 | options.catppuccin.obs = catppuccinLib.mkCatppuccinOption { name = "obs-studio"; }; 15 | 16 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 17 | from = [ 18 | "programs" 19 | "obs-studio" 20 | "catppuccin" 21 | ]; 22 | to = "obs"; 23 | }; 24 | 25 | config = lib.mkIf enable { 26 | xdg.configFile = { 27 | "obs-studio/themes/Catppuccin.obt".source = "${sources.obs}/Catppuccin.obt"; 28 | "obs-studio/themes/${themeName}".source = "${sources.obs}/${themeName}"; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/home-manager/polybar.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.polybar; 8 | in 9 | 10 | { 11 | options.catppuccin.polybar = catppuccinLib.mkCatppuccinOption { name = "polybar"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "services" 16 | "polybar" 17 | "catppuccin" 18 | ]; 19 | to = "polybar"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | services.polybar = { 24 | extraConfig = lib.fileContents "${sources.polybar}/${cfg.flavor}.ini"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/home-manager/qutebrowser.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | cfg = config.catppuccin.qutebrowser; 12 | enable = cfg.enable && config.programs.qutebrowser.enable; 13 | 14 | files = { 15 | "qutebrowser/catppuccin".source = sources.qutebrowser; 16 | }; 17 | in 18 | 19 | { 20 | options.catppuccin.qutebrowser = catppuccinLib.mkCatppuccinOption { name = "qutebrowser"; }; 21 | 22 | config = lib.mkIf enable { 23 | programs.qutebrowser = { 24 | extraConfig = lib.mkMerge [ 25 | (lib.mkBefore "import catppuccin") 26 | (lib.mkAfter "catppuccin.setup(c, '${cfg.flavor}', True)") 27 | ]; 28 | }; 29 | 30 | home.file = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin ( 31 | lib.mapAttrs' (name: lib.nameValuePair ("." + name)) files 32 | ); 33 | 34 | xdg.configFile = lib.mkIf pkgs.stdenv.hostPlatform.isLinux files; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /modules/home-manager/rio.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.rio; 8 | in 9 | 10 | { 11 | options.catppuccin.rio = catppuccinLib.mkCatppuccinOption { name = "rio"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "rio" 17 | "catppuccin" 18 | ]; 19 | to = "rio"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.rio = { 24 | settings = lib.importTOML "${sources.rio}/catppuccin-${cfg.flavor}.toml"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/home-manager/rofi.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.rofi; 8 | enable = config.programs.rofi.enable && cfg.enable; 9 | in 10 | 11 | { 12 | options.catppuccin.rofi = catppuccinLib.mkCatppuccinOption { name = "rofi"; }; 13 | 14 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 15 | from = [ 16 | "programs" 17 | "rofi" 18 | "catppuccin" 19 | ]; 20 | to = "rofi"; 21 | }; 22 | 23 | config = lib.mkIf enable { 24 | programs.rofi = { 25 | theme = { 26 | "@theme" = "catppuccin-default"; 27 | "@import" = "catppuccin-${cfg.flavor}"; 28 | }; 29 | }; 30 | 31 | xdg.dataFile = { 32 | "rofi/themes/catppuccin-default.rasi" = { 33 | source = sources.rofi + "/catppuccin-default.rasi"; 34 | }; 35 | "rofi/themes/catppuccin-${cfg.flavor}.rasi" = { 36 | source = sources.rofi + "/themes/catppuccin-${cfg.flavor}.rasi"; 37 | }; 38 | }; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /modules/home-manager/sioyek.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.sioyek; 8 | enable = cfg.enable && config.programs.sioyek.enable; 9 | 10 | themeFile = "/catppuccin-${cfg.flavor}.config"; 11 | theme = sources.sioyek + themeFile; 12 | in 13 | 14 | { 15 | options.catppuccin.sioyek = catppuccinLib.mkCatppuccinOption { 16 | name = "sioyek"; 17 | }; 18 | 19 | config = lib.mkIf enable { 20 | programs.sioyek.config = catppuccinLib.importINI theme; 21 | }; 22 | } -------------------------------------------------------------------------------- /modules/home-manager/skim.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.skim; 8 | palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; 9 | in 10 | 11 | { 12 | options.catppuccin.skim = catppuccinLib.mkCatppuccinOption { name = "skim"; }; 13 | 14 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 15 | from = [ 16 | "programs" 17 | "skim" 18 | "catppuccin" 19 | ]; 20 | to = "skim"; 21 | }; 22 | 23 | config = lib.mkIf cfg.enable { 24 | programs.skim = { 25 | defaultOptions = [ 26 | "--color=fg:${palette.text.hex},bg:${palette.base.hex},matched:${palette.surface0.hex},matched_bg:${palette.flamingo.hex},current:${palette.text.hex},current_bg:${palette.surface1.hex},current_match:${palette.base.hex},current_match_bg:${palette.rosewater.hex},spinner:${palette.green.hex},info:${palette.mauve.hex},prompt:${palette.blue.hex},cursor:${palette.red.hex},selected:${palette.maroon.hex},header:${palette.teal.hex},border:${palette.overlay0.hex}" 27 | ]; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/home-manager/spotify-player.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.spotify-player; 8 | in 9 | 10 | { 11 | options.catppuccin.spotify-player = catppuccinLib.mkCatppuccinOption { 12 | name = "spotify-player"; 13 | }; 14 | 15 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 16 | from = [ 17 | "programs" 18 | "spotify-player" 19 | "catppuccin" 20 | ]; 21 | to = "spotify-player"; 22 | }; 23 | 24 | config = lib.mkIf cfg.enable { 25 | programs.spotify-player = { 26 | settings.theme = "Catppuccin-${cfg.flavor}"; 27 | inherit (lib.importTOML "${sources.spotify-player}/theme.toml") themes; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/home-manager/starship.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.starship; 8 | in 9 | 10 | { 11 | options.catppuccin.starship = catppuccinLib.mkCatppuccinOption { name = "starship"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "starship" 17 | "catppuccin" 18 | ]; 19 | to = "starship"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.starship = { 24 | settings = { 25 | format = lib.mkDefault "$all"; 26 | palette = "catppuccin_${cfg.flavor}"; 27 | } // lib.importTOML "${sources.starship}/${cfg.flavor}.toml"; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/home-manager/sway.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.sway; 8 | theme = "${sources.sway}/catppuccin-${cfg.flavor}"; 9 | in 10 | 11 | { 12 | options.catppuccin.sway = catppuccinLib.mkCatppuccinOption { name = "sway"; }; 13 | 14 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 15 | from = [ 16 | "wayland" 17 | "windowManager" 18 | "sway" 19 | "catppuccin" 20 | ]; 21 | to = "sway"; 22 | }; 23 | 24 | config = lib.mkIf cfg.enable { 25 | wayland.windowManager.sway = { 26 | extraConfigEarly = '' 27 | include ${theme} 28 | ''; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/home-manager/swaylock.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.swaylock; 8 | in 9 | 10 | { 11 | options.catppuccin.swaylock = catppuccinLib.mkCatppuccinOption { 12 | name = "swaylock"; 13 | /* 14 | global `catppuccin.enable` purposefully doesn't work here in configurations with a `home.stateVersion` 15 | that is >= 23.05 16 | this is because the upstream module will automatically enable itself if `programs.swaylock.settings` 17 | is set in configurations with a `home.stateVersion` that is < 23.05. so, we can't use the 18 | `programs.swaylock.enable` option to guard against defining this like we usually do, as when the 19 | upstream `enable` option is unset on these systems it checks that same `settings` option we would be 20 | defining if *our* and the upstream's `enable` option is `true` ...leading to a case of infinite 21 | recursion where `programs.swaylock.settings` is only being defined if `programs.swaylock.settings` is 22 | defined 23 | debugging this was the most confusing and horrifying thing i've had to deal with throughout working on 24 | this project. 25 | - @getchoo 26 | */ 27 | default = lib.versionAtLeast config.home.stateVersion "23.05" && config.catppuccin.enable; 28 | defaultText = lib.literalExpression '' 29 | `catppuccin.enable` if `home.stateVersion` is >= 23.05, false otherwise 30 | Yes this is weird, and there's a funny story about it in the code comments 31 | ''; 32 | }; 33 | 34 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 35 | from = [ 36 | "programs" 37 | "swaylock" 38 | "catppuccin" 39 | ]; 40 | to = "swaylock"; 41 | }; 42 | 43 | config = lib.mkIf cfg.enable { 44 | programs.swaylock = { 45 | settings = catppuccinLib.importINI (sources.swaylock + "/${cfg.flavor}.conf"); 46 | }; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /modules/home-manager/swaync.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | cfg = config.catppuccin.swaync; 12 | 13 | enable = cfg.enable && config.services.swaync.enable; 14 | 15 | theme = pkgs.substitute { 16 | src = sources.swaync + "/${cfg.flavor}.css"; 17 | 18 | substitutions = [ 19 | "--replace-warn" 20 | "Ubuntu Nerd Font" 21 | cfg.font 22 | ]; 23 | }; 24 | in 25 | 26 | { 27 | options.catppuccin.swaync = 28 | catppuccinLib.mkCatppuccinOption { 29 | name = "swaync"; 30 | } 31 | // { 32 | font = lib.mkOption { 33 | type = lib.types.str; 34 | default = "Ubuntu Nerd Font"; 35 | description = "Font to use for the notification center"; 36 | }; 37 | }; 38 | 39 | config = lib.mkIf enable { 40 | services.swaync.style = theme; 41 | 42 | # Install the default font if it is selected 43 | home.packages = lib.mkIf (cfg.font == "Ubuntu Nerd Font") [ 44 | # TODO: Remove when 25.05 is stable and `nerdfonts` is fully deprecated 45 | ( 46 | if pkgs ? "nerd-fonts" then 47 | pkgs.nerd-fonts.ubuntu 48 | else 49 | pkgs.nerdfonts.override { fonts = [ "Ubuntu" ]; } 50 | ) 51 | ]; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /modules/home-manager/thunderbird.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | cfg = config.catppuccin.thunderbird; 12 | enable = cfg.enable && config.programs.thunderbird.enable; 13 | in 14 | { 15 | options.catppuccin.thunderbird = 16 | catppuccinLib.mkCatppuccinOption { 17 | name = "thunderbird"; 18 | accentSupport = true; 19 | default = lib.versionAtLeast config.home.stateVersion "25.05" && config.catppuccin.enable; 20 | } 21 | // { 22 | profile = lib.mkOption { 23 | type = lib.types.str; 24 | default = "catppuccin-${cfg.flavor}-${cfg.accent}"; 25 | description = "The profile name"; 26 | }; 27 | }; 28 | 29 | config = lib.mkIf enable { 30 | 31 | # extensions support was added in https://github.com/nix-community/home-manager/pull/6033 32 | assertions = [ (catppuccinLib.assertMinimumVersion "25.05") ]; 33 | 34 | programs.thunderbird = { 35 | profiles."${cfg.profile}".extensions = [ 36 | (pkgs.runCommandLocal "catppuccin-${cfg.flavor}-${cfg.accent}.thunderbird.theme" 37 | { 38 | buildInputs = [ sources.thunderbird ]; 39 | nativeBuildInputs = with pkgs; [ 40 | jq 41 | unzip 42 | ]; 43 | } 44 | '' 45 | xpi=${sources.thunderbird}/${cfg.flavor}/${cfg.flavor}-${cfg.accent}.xpi 46 | extId=$(unzip -qc $xpi manifest.json | jq -r .applications.gecko.id) 47 | # The extensions path shared by all profiles. 48 | extensionPath="extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 49 | install -Dv $xpi $out/share/mozilla/$extensionPath/$extId.xpi 50 | '' 51 | ) 52 | ]; 53 | }; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /modules/home-manager/tmux.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.catppuccin.tmux; 10 | in 11 | 12 | { 13 | options.catppuccin.tmux = catppuccinLib.mkCatppuccinOption { name = "tmux"; } // { 14 | extraConfig = lib.mkOption { 15 | type = lib.types.lines; 16 | description = "Additional configuration for the catppuccin plugin."; 17 | default = ""; 18 | example = '' 19 | set -g @catppuccin_status_modules_right "application session user host date_time" 20 | ''; 21 | }; 22 | }; 23 | 24 | imports = 25 | (catppuccinLib.mkRenamedCatppuccinOptions { 26 | from = [ 27 | "programs" 28 | "tmux" 29 | "catppuccin" 30 | ]; 31 | to = "tmux"; 32 | }) 33 | ++ [ 34 | (lib.mkRenamedOptionModule 35 | [ 36 | "programs" 37 | "tmux" 38 | "catppuccin" 39 | "extraConfig" 40 | ] 41 | [ 42 | "catppuccin" 43 | "tmux" 44 | "extraConfig" 45 | ] 46 | ) 47 | ]; 48 | 49 | config = lib.mkIf cfg.enable { 50 | programs.tmux = { 51 | plugins = [ 52 | { 53 | plugin = config.catppuccin.sources.tmux; 54 | extraConfig = lib.concatStrings [ 55 | '' 56 | set -g @catppuccin_flavor '${cfg.flavor}' 57 | '' 58 | cfg.extraConfig 59 | ]; 60 | } 61 | ]; 62 | }; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /modules/home-manager/tofi.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.tofi; 8 | in 9 | 10 | { 11 | options.catppuccin.tofi = catppuccinLib.mkCatppuccinOption { name = "tofi"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "tofi" 17 | "catppuccin" 18 | ]; 19 | to = "tofi"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.tofi = { 24 | settings = { 25 | include = sources.tofi + "/catppuccin-${cfg.flavor}"; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/home-manager/vscode.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (config.catppuccin) sources; 11 | cfg = config.catppuccin.vscode; 12 | 13 | usesPerProfileCfg = lib.versionAtLeast catppuccinLib.getModuleRelease "25.05"; 14 | settings = { 15 | extensions = [ (sources.vscode.override { catppuccinOptions = cfg.settings; }) ]; 16 | 17 | userSettings = { 18 | "workbench.colorTheme" = 19 | "Catppuccin " + (if cfg.flavor == "frappe" then "Frappé" else catppuccinLib.mkUpper cfg.flavor); 20 | "catppuccin.accentColor" = cfg.accent; 21 | 22 | # Recommended settings 23 | # https://github.com/catppuccin/vscode?tab=readme-ov-file#vscode-settings 24 | "editor.semanticHighlighting.enabled" = lib.mkDefault true; 25 | "terminal.integrated.minimumContrastRatio" = lib.mkDefault 1; 26 | "window.titleBarStyle" = lib.mkDefault "custom"; 27 | }; 28 | }; 29 | 30 | settingsFormat = pkgs.formats.json { }; 31 | 32 | settingsSubmodule = { 33 | freeformType = settingsFormat.type; 34 | 35 | options = { 36 | accent = lib.mkOption { 37 | type = catppuccinLib.types.accent; 38 | default = cfg.accent; 39 | }; 40 | }; 41 | }; 42 | in 43 | 44 | { 45 | options.catppuccin.vscode = 46 | catppuccinLib.mkCatppuccinOption { 47 | name = "vscode"; 48 | accentSupport = true; 49 | } 50 | // { 51 | settings = lib.mkOption { 52 | description = '' 53 | Settings for the extension theme. 54 | 55 | See https://github.com/catppuccin/vscode/blob/8ac8c5e1db78174c98c55ecd9c1bd3a6f2cbbc0b/packages/catppuccin-vsc/src/theme/index.ts#L14-L25 for a full list of options. 56 | ''; 57 | default = { }; 58 | type = lib.types.submodule settingsSubmodule; 59 | }; 60 | }; 61 | 62 | config = lib.mkIf cfg.enable { 63 | # TODO: Remove compat layer when 25.05 is stable 64 | # https://github.com/nix-community/home-manager/pull/5640 65 | programs.vscode = 66 | if usesPerProfileCfg then 67 | { 68 | profiles.default = settings; 69 | } 70 | else 71 | settings; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /modules/home-manager/waybar.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.waybar; 8 | enable = cfg.enable && config.programs.waybar.enable; 9 | 10 | styleFile = "${sources.waybar}/${cfg.flavor}.css"; 11 | in 12 | 13 | { 14 | options.catppuccin.waybar = catppuccinLib.mkCatppuccinOption { name = "waybar"; } // { 15 | mode = lib.mkOption { 16 | type = lib.types.enum [ 17 | "prependImport" 18 | "createLink" 19 | ]; 20 | default = "prependImport"; 21 | description = '' 22 | Defines how to include the catppuccin theme css file: 23 | 24 | - `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority). 25 | - `createLink`: Creates a symbolic link `~/.config/waybar/catppuccin.css`, which needs to be included in the waybar stylesheet. 26 | ''; 27 | }; 28 | }; 29 | 30 | imports = 31 | (catppuccinLib.mkRenamedCatppuccinOptions { 32 | from = [ 33 | "programs" 34 | "waybar" 35 | "catppuccin" 36 | ]; 37 | to = "waybar"; 38 | }) 39 | ++ [ 40 | (lib.mkRenamedOptionModule 41 | [ 42 | "programs" 43 | "waybar" 44 | "catppuccin" 45 | "mode" 46 | ] 47 | [ 48 | "catppuccin" 49 | "waybar" 50 | "mode" 51 | ] 52 | ) 53 | ]; 54 | 55 | config = lib.mkIf enable ( 56 | lib.mkMerge [ 57 | (lib.mkIf (cfg.mode == "prependImport") { 58 | programs.waybar = { 59 | style = lib.mkBefore '' 60 | @import "${styleFile}"; 61 | ''; 62 | }; 63 | }) 64 | 65 | (lib.mkIf (cfg.mode == "createLink") { 66 | xdg.configFile = { 67 | "waybar/catppuccin.css".source = styleFile; 68 | }; 69 | }) 70 | ] 71 | ); 72 | } 73 | -------------------------------------------------------------------------------- /modules/home-manager/wezterm.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | cfg = config.catppuccin.wezterm; 7 | in 8 | { 9 | options.catppuccin.wezterm = catppuccinLib.mkCatppuccinOption { name = "wezterm"; } // { 10 | apply = lib.mkOption { 11 | type = lib.types.bool; 12 | default = false; 13 | description = "Apply Catppuccin theme to WezTerm."; 14 | }; 15 | }; 16 | 17 | config = lib.mkIf cfg.enable { 18 | programs.wezterm = { 19 | colorSchemes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.wezterm}/dist/catppuccin-${cfg.flavor}.toml"; 20 | extraConfig = lib.mkBefore ('' 21 | local catppuccin_plugin = "${sources.wezterm}/plugin/init.lua" 22 | '' 23 | + lib.optionalString cfg.apply '' 24 | local config = {} 25 | if wezterm.config_builder then 26 | config = wezterm.config_builder() 27 | end 28 | 29 | dofile("${sources.wezterm}/plugin/init.lua").apply_to_config(config) 30 | ''); 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/home-manager/wlogout.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.wlogout; 8 | in 9 | 10 | { 11 | options.catppuccin.wlogout = 12 | catppuccinLib.mkCatppuccinOption { 13 | name = "wlogout"; 14 | accentSupport = true; 15 | } 16 | // { 17 | iconStyle = lib.mkOption { 18 | type = lib.types.enum [ 19 | "wlogout" 20 | "wleave" 21 | ]; 22 | description = "Icon style to set in ~/.config/wlogout/style.css"; 23 | default = "wlogout"; 24 | example = lib.literalExpression "wleave"; 25 | }; 26 | extraStyle = lib.mkOption { 27 | type = lib.types.lines; 28 | description = "Additional CSS to put in ~/.config/wlogout/style.css"; 29 | default = ""; 30 | example = lib.literalExpression '' 31 | button { 32 | border-radius: 2px; 33 | } 34 | 35 | #lock { 36 | background-image: url("''${config.gtk.iconTheme.package}/share/icons/''${config.gtk.iconTheme.name}/apps/scalable/system-lock-screen.svg"); 37 | } 38 | ''; 39 | }; 40 | }; 41 | 42 | config = lib.mkIf cfg.enable { 43 | programs.wlogout.style = lib.concatStrings [ 44 | '' 45 | @import url("${sources.wlogout}/themes/${cfg.flavor}/${cfg.accent}.css"); 46 | '' 47 | (lib.concatMapStrings 48 | (icon: '' 49 | #${icon} { 50 | background-image: url("${sources.wlogout}/icons/${cfg.iconStyle}/${cfg.flavor}/${cfg.accent}/${icon}.svg"); 51 | } 52 | '') 53 | [ 54 | "hibernate" 55 | "lock" 56 | "logout" 57 | "reboot" 58 | "shutdown" 59 | "suspend" 60 | ] 61 | ) 62 | cfg.extraStyle 63 | ]; 64 | }; 65 | } 66 | -------------------------------------------------------------------------------- /modules/home-manager/yazi.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.yazi; 8 | enable = cfg.enable && config.programs.yazi.enable; 9 | in 10 | 11 | { 12 | options.catppuccin.yazi = catppuccinLib.mkCatppuccinOption { 13 | name = "yazi"; 14 | accentSupport = true; 15 | }; 16 | 17 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 18 | from = [ 19 | "programs" 20 | "yazi" 21 | "catppuccin" 22 | ]; 23 | to = "yazi"; 24 | accentSupport = true; 25 | }; 26 | 27 | config = lib.mkIf enable { 28 | xdg.configFile = { 29 | "yazi/theme.toml".source = 30 | "${sources.yazi}/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.toml"; 31 | 32 | "yazi/Catppuccin-${cfg.flavor}.tmTheme".source = 33 | "${sources.bat}/Catppuccin ${catppuccinLib.mkUpper cfg.flavor}.tmTheme"; 34 | }; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /modules/home-manager/zathura.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.zathura; 8 | in 9 | 10 | { 11 | options.catppuccin.zathura = catppuccinLib.mkCatppuccinOption { name = "zathura"; }; 12 | 13 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 14 | from = [ 15 | "programs" 16 | "zathura" 17 | "catppuccin" 18 | ]; 19 | to = "zathura"; 20 | }; 21 | 22 | config = lib.mkIf cfg.enable { 23 | programs.zathura = { 24 | extraConfig = '' 25 | include ${sources.zathura + "/catppuccin-${cfg.flavor}"} 26 | ''; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/home-manager/zed-editor.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.zed; 8 | enable = cfg.enable && config.programs.zed-editor.enable; 9 | 10 | accent = if cfg.accent == "mauve" then "" else " (${cfg.accent})"; 11 | flavor = if cfg.flavor == "frappe" then "Frappé" else catppuccinLib.mkUpper cfg.flavor; 12 | in 13 | 14 | { 15 | options.catppuccin.zed = 16 | catppuccinLib.mkCatppuccinOption { 17 | name = "zed"; 18 | accentSupport = true; 19 | } 20 | // { 21 | italics = lib.mkEnableOption "the italicized version of theme" // { 22 | default = true; 23 | }; 24 | }; 25 | 26 | config = lib.mkIf enable { 27 | programs.zed-editor = { 28 | extensions = [ "catppuccin-icons" ]; 29 | userSettings = { 30 | icon_theme = "Catppuccin " + flavor; 31 | theme = { 32 | light = "Catppuccin " + flavor + accent + lib.optionalString (!cfg.italics) " - No Italics"; 33 | dark = "Catppuccin " + flavor + accent + lib.optionalString (!cfg.italics) " - No Italics"; 34 | }; 35 | }; 36 | }; 37 | 38 | xdg.configFile = { 39 | "zed/themes/catppuccin.json".source = "${sources.zed}/catppuccin-${ 40 | lib.optionalString (!cfg.italics) "no-italics-" 41 | }${cfg.accent}.json"; 42 | }; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /modules/home-manager/zellij.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | cfg = config.catppuccin.zellij; 6 | themeName = "catppuccin-${cfg.flavor}"; 7 | in 8 | 9 | { 10 | options.catppuccin.zellij = catppuccinLib.mkCatppuccinOption { name = "zellij"; }; 11 | 12 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 13 | from = [ 14 | "programs" 15 | "zellij" 16 | "catppuccin" 17 | ]; 18 | to = "zellij"; 19 | }; 20 | 21 | config = lib.mkIf cfg.enable { 22 | programs.zellij = { 23 | settings = { 24 | theme = themeName; 25 | }; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /modules/home-manager/zsh-syntax-highlighting.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.zsh-syntax-highlighting; 8 | oldCfg = config.programs.zsh.syntaxHighlighting.catppuccin; 9 | 10 | isSubmoduleOptionDefined = value: (builtins.tryEval value).success; 11 | in 12 | 13 | { 14 | options = { 15 | catppuccin.zsh-syntax-highlighting = catppuccinLib.mkCatppuccinOption { 16 | name = "Zsh Syntax Highlighting"; 17 | }; 18 | 19 | # `mkRenamedOptionModule` can't rename submodule options to top-level ones 20 | # Enter this nonsense 21 | # TODO: Abstract this 22 | 23 | # Extend the base submodule with our own options 24 | programs.zsh.syntaxHighlighting = { 25 | # Create options manually as `mkRenamedOptionModule` would 26 | catppuccin = { 27 | # But don't include the `trace` to each option since we do need to 28 | # check them with `isSubmoduleOptionDefined` 29 | enable = lib.mkOption { 30 | type = lib.types.bool; 31 | description = "Alias of `catppuccin.zsh-syntax-highlighting.enable`"; 32 | visible = false; 33 | }; 34 | 35 | flavor = lib.mkOption { 36 | type = catppuccinLib.types.flavor; 37 | description = "Alias of `catppuccin.zsh-syntax-highlighting.flavor`"; 38 | visible = false; 39 | }; 40 | }; 41 | }; 42 | }; 43 | 44 | config = lib.mkMerge [ 45 | (lib.mkIf (isSubmoduleOptionDefined oldCfg.enable) { 46 | # Place the warning, also like `mkRenamedOptionModule` normally would 47 | warnings = [ 48 | "The option `programs.zsh.syntaxHighlighting.catppuccin.enable` has been renamed to `catppuccin.zsh-syntax-highlighting.enable`." 49 | ]; 50 | 51 | # Actually alias the option 52 | catppuccin.zsh-syntax-highlighting.enable = oldCfg.enable; 53 | }) 54 | 55 | # Do it again for the flavor 56 | (lib.mkIf (isSubmoduleOptionDefined oldCfg.flavor) { 57 | warnings = [ 58 | "The option `programs.zsh.syntaxHighlighting.catppuccin.flavor` has been renamed to `catppuccin.zsh-syntax-highlighting.flavor`." 59 | ]; 60 | 61 | catppuccin.zsh-syntax-highlighting.flavor = oldCfg.flavor; 62 | }) 63 | 64 | # And this is our actual module 65 | (lib.mkIf cfg.enable { 66 | programs.zsh = 67 | let 68 | key = if builtins.hasAttr "initContent" config.programs.zsh then "initContent" else "initExtra"; 69 | in 70 | { 71 | # NOTE: Backwards compatible mkOrder priority working with stable/unstable HM. 72 | "${key}" = lib.mkOrder (if key == "initContent" then 950 else 500) '' 73 | source '${sources.zsh-syntax-highlighting}/catppuccin_${cfg.flavor}-zsh-syntax-highlighting.zsh' 74 | ''; 75 | }; 76 | }) 77 | ]; 78 | } 79 | -------------------------------------------------------------------------------- /modules/lib/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: 7 | 8 | let 9 | inherit (lib) 10 | flip 11 | importJSON 12 | mkEnableOption 13 | mkOption 14 | mkRenamedOptionModule 15 | mkSinkUndeclaredOptions 16 | optional 17 | optionalAttrs 18 | stringLength 19 | substring 20 | toUpper 21 | types 22 | versionAtLeast 23 | ; 24 | 25 | inherit (lib.modules) importApply; 26 | 27 | inherit (pkgs) 28 | runCommand 29 | ; 30 | in 31 | 32 | lib.makeExtensible (ctp: { 33 | types = { 34 | flavor = types.enum [ 35 | "latte" 36 | "frappe" 37 | "macchiato" 38 | "mocha" 39 | ]; 40 | 41 | accent = types.enum [ 42 | "blue" 43 | "flamingo" 44 | "green" 45 | "lavender" 46 | "maroon" 47 | "mauve" 48 | "peach" 49 | "pink" 50 | "red" 51 | "rosewater" 52 | "sapphire" 53 | "sky" 54 | "teal" 55 | "yellow" 56 | ]; 57 | }; 58 | 59 | /** 60 | Capitalize the first letter in a string 61 | 62 | # Example 63 | 64 | ```nix 65 | mkUpper "foo" 66 | => "Foo" 67 | ``` 68 | 69 | # Type 70 | 71 | ``` 72 | mkUpper :: String -> String 73 | ``` 74 | 75 | # Arguments 76 | 77 | - [str] String to capitalize 78 | */ 79 | mkUpper = str: (toUpper (substring 0 1 str)) + (substring 1 (stringLength str) str); 80 | 81 | /** 82 | Reads a YAML file 83 | 84 | # Example 85 | 86 | ```nix 87 | importYAML ./file.yaml 88 | ``` 89 | 90 | # Type 91 | 92 | ``` 93 | importYAML :: Path -> Any 94 | ``` 95 | 96 | # Arguments 97 | 98 | - [path] Path to YAML file 99 | */ 100 | importYAML = 101 | path: 102 | importJSON ( 103 | runCommand "converted.json" { nativeBuildInputs = [ pkgs.yj ]; } '' 104 | yj < ${path} > $out 105 | '' 106 | ); 107 | 108 | /** 109 | Reads an INI file 110 | 111 | # Example 112 | 113 | ```nix 114 | importINI ./file.ini 115 | ``` 116 | 117 | # Type 118 | 119 | ``` 120 | importINI :: Path -> Any 121 | ``` 122 | 123 | # Arguments 124 | 125 | - [path] Path to INI file 126 | */ 127 | importINI = 128 | path: 129 | importJSON ( 130 | runCommand "converted.json" { nativeBuildInputs = [ pkgs.jc ]; } '' 131 | jc --ini < ${path} > $out 132 | '' 133 | ); 134 | 135 | /** 136 | Reads a raw INI file 137 | 138 | # Example 139 | 140 | ```nix 141 | importINIRaw ./file.ini 142 | ``` 143 | 144 | # Type 145 | 146 | ``` 147 | importINIRaw :: Path -> Any 148 | ``` 149 | 150 | # Arguments 151 | 152 | - [path] Path to INI file 153 | */ 154 | importINIRaw = 155 | path: 156 | importJSON ( 157 | runCommand "converted.json" { nativeBuildInputs = [ pkgs.jc ]; } '' 158 | jc --ini -r < ${path} > $out 159 | '' 160 | ); 161 | 162 | /** 163 | Creates an attribute set of standard Catppuccin module options 164 | 165 | # Example 166 | 167 | ``` 168 | mkCatppuccinOption { name = "myProgram"; } 169 | ``` 170 | 171 | # Type 172 | 173 | ``` 174 | mkCatppuccinOption :: AttrSet -> AttrSet 175 | ``` 176 | 177 | # Arguments 178 | 179 | - [name] Name of the module 180 | - [useGlobalEnable] Whether to enable the module by default when `catppuccin.enable` is set (recommended, defaults to `true`) 181 | - [default] Default `enable` option value (defaults to `if useGlobalEnable then config.catppuccin.enable else false`) 182 | - [defaultText] Default `enable` option text (automatic if `null`, defaults to `if useGlobalEnable then "config.catppuccin.enable" else null`) 183 | - [accentSupport] Add an `accent` option (defaults to `false`) 184 | */ 185 | mkCatppuccinOption = 186 | { 187 | name, 188 | useGlobalEnable ? true, 189 | default ? if useGlobalEnable then config.catppuccin.enable else false, 190 | defaultText ? if useGlobalEnable then "catppuccin.enable" else null, 191 | accentSupport ? false, 192 | }: 193 | 194 | { 195 | enable = 196 | mkEnableOption "Catppuccin theme for ${name}" 197 | // ( 198 | { 199 | inherit default; 200 | } 201 | // optionalAttrs (defaultText != null) { inherit defaultText; } 202 | ); 203 | 204 | flavor = mkOption { 205 | type = ctp.types.flavor; 206 | default = config.catppuccin.flavor; 207 | description = "Catppuccin flavor for ${name}"; 208 | }; 209 | } 210 | // optionalAttrs accentSupport { 211 | accent = mkOption { 212 | type = ctp.types.accent; 213 | default = config.catppuccin.accent; 214 | description = "Catppuccin accent for ${name}"; 215 | }; 216 | }; 217 | 218 | /** 219 | Merge the given enum types 220 | See https://nixos.org/manual/nixos/stable/#sec-option-types-custom & https://github.com/NixOS/nixpkgs/pull/363565#issuecomment-2532950341 221 | 222 | # Example 223 | 224 | ```nix 225 | mergeEnums (lib.types.enum [ 1 2 ]) (lib.types.enum [ 3 4 ]) 226 | => lib.types.enum [ 1 2 3 4 ] 227 | ``` 228 | 229 | # Type 230 | 231 | ``` 232 | mergeEnums :: Enum -> Enum -> Enum 233 | ``` 234 | */ 235 | mergeEnums = a: b: a.typeMerge b.functor; 236 | 237 | /** 238 | Returns the current release version of nixos or home-manager. 239 | Throws an evaluation error if neither are found 240 | 241 | # Example 242 | 243 | ```nix 244 | getModuleRelease 245 | => "24.11" 246 | ``` 247 | 248 | # Type 249 | 250 | ``` 251 | getModuleRelease :: String 252 | ``` 253 | */ 254 | getModuleRelease = 255 | config.home.version.release or config.system.nixos.release 256 | or (throw "Couldn't determine release version!"); 257 | 258 | /** 259 | Create options only if the current module release is more than a given version 260 | 261 | # Example 262 | 263 | ```nix 264 | mkVersionedOpts "24.11" { myOption = lib.mkOption { ... }; } 265 | => { myOption = { ... }; } 266 | ``` 267 | 268 | # Type 269 | 270 | ``` 271 | mkVersionedOpts :: String -> AttrSet -> AttrSet 272 | ``` 273 | 274 | # Arguments 275 | 276 | - [minVersion] Minimum module release to create options for 277 | - [options] Conditional options 278 | */ 279 | mkVersionedOpts = 280 | minVersion: options: 281 | if versionAtLeast ctp.getModuleRelease minVersion then options else mkSinkUndeclaredOptions { }; 282 | 283 | /** 284 | Assert the current module release is >= the given version 285 | 286 | # Example 287 | 288 | ```nix 289 | assertMinimumVersion "24.11"; 290 | => { ... } 291 | ``` 292 | 293 | # Type 294 | 295 | ``` 296 | getModuleRelease :: String -> AttrSet 297 | ``` 298 | 299 | # Arguments 300 | 301 | - [version] Minimum version required 302 | ``` 303 | */ 304 | assertMinimumVersion = version: { 305 | assertion = versionAtLeast ctp.getModuleRelease version; 306 | message = "`catppuccin/nix` requires at least version ${version} of NixOS/home-manager"; 307 | }; 308 | 309 | /** 310 | Imports the given modules with the current library 311 | 312 | # Example 313 | 314 | ```nix 315 | applyToModules [ ./module.nix ] 316 | => [ { ... } ] 317 | ``` 318 | 319 | # Type 320 | 321 | ``` 322 | applyToModules :: [ Module ] -> [ Module ] 323 | ``` 324 | 325 | # Arguments 326 | 327 | - [modules] Modules to import 328 | ``` 329 | */ 330 | applyToModules = map (flip importApply { catppuccinLib = ctp; }); 331 | 332 | /** 333 | Apply `mkRenamedOptionModule` to a set of standard Catppuccin module options (like those created by `mkCatppuccinOption`) 334 | 335 | # Example 336 | 337 | ```nix 338 | mkRenamedCatppuccinOptions { from = [ "myProgram" "catppuccin" ]; to = [ "myProgram" ]; } 339 | => [ { ... } ] 340 | ``` 341 | 342 | # Type 343 | 344 | ``` 345 | mkRenamedCatppuccinOptions :: AttrSet -> [ Module ] 346 | ``` 347 | 348 | # Arguments 349 | 350 | - [from] Path to original option 351 | - [to] Path to new option (relative to the root `catppuccin` namespace) 352 | - [accentSupport] Whether to alias `accent` options (defaults to false) 353 | ``` 354 | */ 355 | mkRenamedCatppuccinOptions = 356 | { 357 | from, 358 | to, 359 | accentSupport ? false, 360 | }: 361 | [ 362 | (mkRenamedOptionModule 363 | ( 364 | from 365 | ++ [ 366 | "enable" 367 | ] 368 | ) 369 | [ 370 | "catppuccin" 371 | to 372 | "enable" 373 | ] 374 | ) 375 | 376 | (mkRenamedOptionModule 377 | ( 378 | from 379 | ++ [ 380 | "flavor" 381 | ] 382 | ) 383 | [ 384 | "catppuccin" 385 | to 386 | "flavor" 387 | ] 388 | ) 389 | ] 390 | ++ optional accentSupport ( 391 | mkRenamedOptionModule 392 | ( 393 | from 394 | ++ [ 395 | "accent" 396 | ] 397 | ) 398 | [ 399 | "catppuccin" 400 | to 401 | "accent" 402 | ] 403 | ); 404 | }) 405 | -------------------------------------------------------------------------------- /modules/nixos/all-modules.nix: -------------------------------------------------------------------------------- 1 | [ 2 | ./fcitx5.nix 3 | ./gitea.nix 4 | ./grub.nix 5 | ./plymouth.nix 6 | ./sddm.nix 7 | ./tty.nix 8 | ] 9 | -------------------------------------------------------------------------------- /modules/nixos/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | _class = "nixos"; 5 | 6 | imports = [ 7 | (lib.modules.importApply ../global.nix { catppuccinModules = import ./all-modules.nix; }) 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /modules/nixos/fcitx5.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.catppuccin.fcitx5; 10 | in 11 | 12 | { 13 | options.catppuccin.fcitx5 = catppuccinLib.mkCatppuccinOption { 14 | name = "Fcitx5"; 15 | accentSupport = true; 16 | }; 17 | 18 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 19 | from = [ 20 | "i18n" 21 | "inputMethod" 22 | "fcitx5" 23 | "catppuccin" 24 | ]; 25 | to = "fcitx5"; 26 | accentSupport = true; 27 | }; 28 | 29 | config = lib.mkIf cfg.enable { 30 | i18n.inputMethod.fcitx5 = { 31 | addons = [ config.catppuccin.sources.fcitx5 ]; 32 | settings.addons.classicui.globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}"; 33 | }; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /modules/nixos/gitea.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | lib, 4 | config, 5 | ... 6 | }: 7 | let 8 | inherit (config.catppuccin) sources; 9 | 10 | valuesFromEnum = 11 | enum: if lib.isList enum.functor.payload then enum.functor.payload else enum.functor.payload.values; 12 | 13 | supportedForges = [ 14 | "gitea" 15 | "forgejo" 16 | ]; 17 | 18 | builtinThemes = { 19 | gitea = [ 20 | "auto" 21 | "gitea" 22 | "arc-greeen" 23 | ]; 24 | 25 | forgejo = [ 26 | "forgejo-auto" 27 | "forgejo-light" 28 | "forgejo-dark" 29 | "gitea-auto" 30 | "gitea-light" 31 | "gitea-dark" 32 | "forgejo-auto-deuteranopia-protanopia" 33 | "forgejo-light-deuteranopia-protanopia" 34 | "forgejo-dark-deuteranopia-protanopia" 35 | "forgejo-auto-tritanopia" 36 | "forgejo-light-tritanopia" 37 | "forgejo-dark-tritanopia" 38 | ]; 39 | }; 40 | in 41 | { 42 | options.catppuccin = lib.genAttrs supportedForges ( 43 | name: 44 | catppuccinLib.mkCatppuccinOption { 45 | inherit name; 46 | accentSupport = true; 47 | } 48 | ); 49 | 50 | config = lib.mkMerge ( 51 | map ( 52 | forge: 53 | let 54 | cfg = config.catppuccin.${forge}; 55 | 56 | inherit (config.services.${forge}) customDir; 57 | themeDir = 58 | if lib.versionAtLeast config.services.${forge}.package.version "1.21.0" then 59 | "${customDir}/public/assets/css" 60 | else 61 | "${customDir}/public/css"; 62 | in 63 | lib.mkIf cfg.enable { 64 | systemd.tmpfiles.settings."10-catppuccin-${forge}-theme" = { 65 | ${themeDir}."L+" = { 66 | argument = toString sources.gitea; 67 | }; 68 | 69 | ${dirOf themeDir}.d = { 70 | inherit (config.services.${forge}) user group; 71 | }; 72 | }; 73 | 74 | services.${forge}.settings.ui = { 75 | DEFAULT_THEME = "catppuccin-${cfg.flavor}-${cfg.accent}"; 76 | THEMES = lib.concatStringsSep "," ( 77 | builtinThemes.${forge} 78 | ++ (lib.mapCartesianProduct ({ flavor, accent }: "catppuccin-${flavor}-${accent}") ( 79 | lib.mapAttrs (lib.const valuesFromEnum) { 80 | inherit (catppuccinLib.types) accent flavor; 81 | } 82 | )) 83 | ); 84 | }; 85 | } 86 | ) supportedForges 87 | ); 88 | } 89 | -------------------------------------------------------------------------------- /modules/nixos/grub.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | inherit (config.catppuccin) sources; 10 | 11 | cfg = config.catppuccin.grub; 12 | 13 | # TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes 14 | theme = sources.grub + "/share/grub/themes/catppuccin-${cfg.flavor}-grub-theme"; 15 | in 16 | 17 | { 18 | options.catppuccin.grub = catppuccinLib.mkCatppuccinOption { name = "grub"; }; 19 | 20 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 21 | from = [ 22 | "boot" 23 | "loader" 24 | "grub" 25 | "catppuccin" 26 | ]; 27 | to = "grub"; 28 | }; 29 | 30 | config = lib.mkIf cfg.enable { 31 | boot.loader.grub = { 32 | font = "${theme}/font.pf2"; 33 | splashImage = "${theme}/background.png"; 34 | inherit theme; 35 | }; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /modules/nixos/plymouth.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.catppuccin.plymouth; 10 | in 11 | 12 | { 13 | options.catppuccin.plymouth = catppuccinLib.mkCatppuccinOption { name = "plymouth"; }; 14 | 15 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 16 | from = [ 17 | "boot" 18 | "plymouth" 19 | "catppuccin" 20 | ]; 21 | to = "plymouth"; 22 | }; 23 | 24 | config = lib.mkIf cfg.enable { 25 | boot.plymouth = { 26 | theme = "catppuccin-${cfg.flavor}"; 27 | themePackages = [ config.catppuccin.sources.plymouth ]; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/nixos/sddm.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { 3 | lib, 4 | pkgs, 5 | config, 6 | ... 7 | }: 8 | 9 | let 10 | inherit (lib) 11 | mkOption 12 | types 13 | ; 14 | 15 | cfg = config.catppuccin.sddm; 16 | enable = cfg.enable && config.services.displayManager.sddm.enable; 17 | in 18 | 19 | { 20 | options.catppuccin.sddm = catppuccinLib.mkCatppuccinOption { name = "sddm"; } // { 21 | font = mkOption { 22 | type = types.str; 23 | default = "Noto Sans"; 24 | description = "Font to use for the login screen"; 25 | }; 26 | 27 | fontSize = mkOption { 28 | type = types.str; 29 | default = "9"; 30 | description = "Font size to use for the login screen"; 31 | }; 32 | 33 | background = mkOption { 34 | type = with types; (either path str); 35 | default = ""; 36 | description = "Background image to use for the login screen"; 37 | }; 38 | 39 | loginBackground = mkOption { 40 | type = types.bool; 41 | default = true; 42 | description = "Add an additional background layer to the login panel"; 43 | }; 44 | 45 | assertQt6Sddm = 46 | lib.mkEnableOption '' 47 | checking if `services.displayManager.sddm.package` is the Qt 6 version. 48 | 49 | This is to ensure the theme is applied properly, but may have false positives in the case of overridden packages for example 50 | '' 51 | // { 52 | default = true; 53 | }; 54 | }; 55 | 56 | imports = 57 | (catppuccinLib.mkRenamedCatppuccinOptions { 58 | from = [ 59 | "services" 60 | "displayManager" 61 | "sddm" 62 | "catppuccin" 63 | ]; 64 | to = "sddm"; 65 | }) 66 | ++ [ 67 | (lib.mkRenamedOptionModule 68 | [ 69 | "services" 70 | "displayManager" 71 | "sddm" 72 | "catppuccin" 73 | "font" 74 | ] 75 | [ 76 | "catppuccin" 77 | "sddm" 78 | "font" 79 | ] 80 | ) 81 | 82 | (lib.mkRenamedOptionModule 83 | [ 84 | "services" 85 | "displayManager" 86 | "sddm" 87 | "catppuccin" 88 | "fontSize" 89 | ] 90 | [ 91 | "catppuccin" 92 | "sddm" 93 | "fontSize" 94 | ] 95 | ) 96 | 97 | (lib.mkRenamedOptionModule 98 | [ 99 | "services" 100 | "displayManager" 101 | "sddm" 102 | "catppuccin" 103 | "background" 104 | ] 105 | [ 106 | "catppuccin" 107 | "sddm" 108 | "background" 109 | ] 110 | ) 111 | 112 | (lib.mkRenamedOptionModule 113 | [ 114 | "services" 115 | "displayManager" 116 | "sddm" 117 | "catppuccin" 118 | "loginBackground" 119 | ] 120 | [ 121 | "catppuccin" 122 | "sddm" 123 | "loginBackground" 124 | ] 125 | ) 126 | 127 | (lib.mkRenamedOptionModule 128 | [ 129 | "services" 130 | "displayManager" 131 | "sddm" 132 | "catppuccin" 133 | "assertQt6Sddm" 134 | ] 135 | [ 136 | "catppuccin" 137 | "sddm" 138 | "assertQt6Sddm" 139 | ] 140 | ) 141 | ]; 142 | 143 | config = lib.mkIf enable { 144 | assertions = lib.optional cfg.assertQt6Sddm { 145 | assertion = config.services.displayManager.sddm.package == pkgs.kdePackages.sddm; 146 | message = '' 147 | Only the Qt 6 version of SDDM is supported by this port! 148 | 149 | In most cases this can be resolved by setting `services.displayManager.sddm.package` 150 | to `pkgs.kdePackages.sddm`. If you know what you're doing and wish to disable this check, 151 | please set `services.displayManager.sddm.catppuccin.assertQt6Sddm` to `false` 152 | ''; 153 | }; 154 | 155 | services.displayManager = { 156 | sddm = { 157 | theme = "catppuccin-${cfg.flavor}"; 158 | }; 159 | }; 160 | 161 | environment.systemPackages = [ 162 | (config.catppuccin.sources.sddm.override { 163 | inherit (cfg) 164 | font 165 | fontSize 166 | background 167 | loginBackground 168 | ; 169 | }) 170 | ]; 171 | }; 172 | } 173 | -------------------------------------------------------------------------------- /modules/nixos/tty.nix: -------------------------------------------------------------------------------- 1 | { catppuccinLib }: 2 | { config, lib, ... }: 3 | 4 | let 5 | inherit (config.catppuccin) sources; 6 | 7 | cfg = config.catppuccin.tty; 8 | enable = cfg.enable && config.console.enable; 9 | palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; 10 | in 11 | 12 | { 13 | options.catppuccin.tty = catppuccinLib.mkCatppuccinOption { name = "tty"; }; 14 | 15 | imports = catppuccinLib.mkRenamedCatppuccinOptions { 16 | from = [ 17 | "console" 18 | "catppuccin" 19 | ]; 20 | to = "tty"; 21 | }; 22 | 23 | config = lib.mkIf enable { 24 | # Manually populate with colors from catppuccin/tty 25 | # Make sure to strip initial # from hex codes 26 | console.colors = map (color: (lib.substring 1 6 palette.${color}.hex)) [ 27 | "base" 28 | "red" 29 | "green" 30 | "yellow" 31 | "blue" 32 | "pink" 33 | "teal" 34 | "subtext1" 35 | 36 | "surface2" 37 | "red" 38 | "green" 39 | "yellow" 40 | "blue" 41 | "pink" 42 | "teal" 43 | "subtext0" 44 | ]; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /modules/tests/common.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | catppuccin = { 5 | enable = true; 6 | sources = { 7 | # this is used to ensure that we are able to apply 8 | # source overrides without breaking the other sources 9 | palette = pkgs.fetchFromGitHub { 10 | owner = "catppuccin"; 11 | repo = "palette"; 12 | rev = "16726028c518b0b94841de57cf51f14c095d43d8"; # refs/tags/1.1.1~1 13 | hash = "sha256-qZjMlZFTzJotOYjURRQMsiOdR2XGGba8XzXwx4+v9tk="; 14 | }; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /modules/tests/darwin.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | home-manager, 5 | }: 6 | 7 | (home-manager.lib.homeManagerConfiguration { 8 | inherit pkgs; 9 | 10 | modules = [ 11 | ./home.nix 12 | 13 | ( 14 | { config, ... }: 15 | 16 | { 17 | home = { 18 | homeDirectory = "/Users/${config.home.username}"; 19 | }; 20 | 21 | i18n.inputMethod.enabled = lib.mkVMOverride null; 22 | 23 | programs = { 24 | cava.enable = lib.mkVMOverride false; # NOTE: this may actually work on darwin, but the package is currently not supported 25 | chromium.enable = lib.mkVMOverride false; 26 | foot.enable = lib.mkVMOverride false; 27 | freetube.enable = lib.mkVMOverride false; # NOTE: currently fails to build 28 | fuzzel.enable = lib.mkVMOverride false; 29 | ghostty.enable = lib.mkVMOverride false; # TODO: Remove when Darwin support is added 30 | hyprlock.enable = lib.mkVMOverride false; 31 | imv.enable = lib.mkVMOverride false; 32 | mpv.enable = lib.mkVMOverride false; # NOTE: same as cava, but `mpv` fails to build currently 33 | obs-studio.enable = lib.mkVMOverride false; 34 | rio.enable = lib.mkVMOverride false; # marked as broken 35 | rofi.enable = lib.mkVMOverride false; 36 | spotify-player.enable = lib.mkVMOverride false; # NOTE: same as mpv 37 | swaylock.enable = lib.mkVMOverride false; 38 | tofi.enable = lib.mkVMOverride false; 39 | thunderbird.enable = lib.mkVMOverride false; 40 | waybar.enable = lib.mkVMOverride false; 41 | wlogout.enable = lib.mkVMOverride false; 42 | }; 43 | 44 | qt.enable = lib.mkVMOverride false; # NOTE: same as cava 45 | 46 | services = { 47 | dunst.enable = lib.mkVMOverride false; 48 | mako.enable = lib.mkVMOverride false; 49 | polybar.enable = lib.mkVMOverride false; 50 | swaync.enable = lib.mkVMOverride false; 51 | }; 52 | 53 | wayland.windowManager = { 54 | hyprland.enable = lib.mkVMOverride false; 55 | sway.enable = lib.mkVMOverride false; 56 | }; 57 | } 58 | ) 59 | ]; 60 | }).activationPackage 61 | -------------------------------------------------------------------------------- /modules/tests/home.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../home-manager 6 | ./common.nix 7 | ]; 8 | 9 | xdg.enable = true; 10 | 11 | home = { 12 | username = lib.fileContents ./username.txt; 13 | stateVersion = lib.mkDefault "23.11"; 14 | }; 15 | 16 | manual.manpages.enable = lib.mkDefault false; 17 | 18 | i18n.inputMethod.enabled = "fcitx5"; 19 | 20 | programs = { 21 | aerc.enable = true; 22 | alacritty.enable = true; 23 | bat.enable = true; 24 | bottom.enable = true; 25 | brave.enable = true; 26 | btop.enable = true; 27 | cava.enable = true; 28 | chromium.enable = true; 29 | fish.enable = true; 30 | foot.enable = true; 31 | freetube.enable = true; 32 | fuzzel.enable = true; 33 | fzf.enable = true; 34 | gh-dash.enable = true; 35 | ghostty.enable = true; 36 | git = { 37 | enable = true; 38 | delta.enable = true; 39 | }; 40 | gitui.enable = true; 41 | # this is enabled by default already, but still 42 | # listing explicitly so we know it's tested 43 | glamour.catppuccin.enable = true; 44 | helix.enable = true; 45 | hyprlock.enable = true; 46 | imv.enable = true; 47 | k9s.enable = true; 48 | kitty.enable = true; 49 | lazygit.enable = true; 50 | lsd.enable = true; 51 | micro.enable = true; 52 | mpv.enable = true; 53 | neovim.enable = true; 54 | newsboat.enable = true; 55 | obs-studio.enable = true; 56 | qutebrowser.enable = true; 57 | rio.enable = true; 58 | rofi.enable = true; 59 | skim.enable = true; 60 | spotify-player.enable = true; 61 | starship.enable = true; 62 | swaylock.enable = true; 63 | tmux.enable = true; 64 | tofi.enable = true; 65 | thunderbird = { 66 | enable = true; 67 | profiles.catppuccin-mocha-mauve.isDefault = true; 68 | }; 69 | vscode = { 70 | enable = true; 71 | package = pkgs.vscodium; 72 | }; 73 | waybar.enable = true; 74 | wezterm.enable = true; 75 | wlogout.enable = true; 76 | yazi.enable = true; 77 | zathura.enable = true; 78 | zed-editor.enable = true; 79 | zellij.enable = true; 80 | zsh = { 81 | enable = true; 82 | syntaxHighlighting.enable = true; 83 | }; 84 | sioyek.enable = true; 85 | }; 86 | 87 | qt = { 88 | enable = true; 89 | platformTheme.name = "kvantum"; 90 | style.name = "kvantum"; 91 | }; 92 | 93 | services = { 94 | dunst.enable = true; 95 | mako.enable = true; 96 | polybar = { 97 | enable = true; 98 | script = '' 99 | polybar top & 100 | ''; 101 | }; 102 | swaync.enable = true; 103 | }; 104 | 105 | wayland.windowManager.sway.enable = true; 106 | wayland.windowManager.hyprland.enable = true; 107 | } 108 | -------------------------------------------------------------------------------- /modules/tests/nixos.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | testers, 4 | home-manager, 5 | }: 6 | 7 | let 8 | userName = lib.fileContents ./username.txt; 9 | in 10 | 11 | testers.runNixOSTest { 12 | name = "catppuccin-nix"; 13 | 14 | nodes.machine = 15 | { config, pkgs, ... }: 16 | 17 | { 18 | imports = [ 19 | home-manager.nixosModules.default 20 | ../nixos 21 | ./common.nix 22 | ]; 23 | 24 | boot = { 25 | loader.grub.enable = true; 26 | plymouth.enable = true; 27 | }; 28 | 29 | services = { 30 | displayManager.sddm = { 31 | enable = true; 32 | package = pkgs.kdePackages.sddm; # our module/the upstream port requires the qt6 version 33 | }; 34 | forgejo.enable = true; 35 | gitea.enable = true; 36 | xserver.enable = true; # required for sddm 37 | }; 38 | 39 | console.enable = true; 40 | 41 | i18n.inputMethod = { 42 | enable = true; 43 | type = "fcitx5"; 44 | }; 45 | 46 | users.users.${userName} = { 47 | isNormalUser = true; 48 | uid = 1000; 49 | }; 50 | 51 | virtualisation = { 52 | memorySize = 4096; 53 | writableStore = true; 54 | }; 55 | 56 | home-manager.users.${userName} = { 57 | imports = [ 58 | ./home.nix 59 | { home = { inherit (config.system) stateVersion; }; } 60 | ]; 61 | }; 62 | }; 63 | 64 | testScript = 65 | { nodes, ... }: 66 | 67 | let 68 | user = nodes.machine.users.users.${userName}; 69 | in 70 | 71 | '' 72 | start_all() 73 | 74 | with subtest("Wait for startup"): 75 | machine.wait_for_unit("multi-user.target") 76 | 77 | with subtest("Activate home-manager environment"): 78 | # HACK: Re-run home-manager activation 79 | # 80 | # As of 24.11, home-manager is activated via a oneshot unit 81 | # `wait_for_unit()` can't handle this, so we run here again with `systemctl` 82 | # https://github.com/NixOS/nixpkgs/issues/62155 83 | machine.systemctl("start home-manager-${user.name}.service") 84 | ''; 85 | } 86 | -------------------------------------------------------------------------------- /modules/tests/username.txt: -------------------------------------------------------------------------------- 1 | pepperjack 2 | -------------------------------------------------------------------------------- /pkgs/aerc/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "aerc"; 5 | 6 | installTargets = [ "dist/" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/alacritty/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "alacritty"; 5 | 6 | dontCatppuccinInstall = true; 7 | 8 | postInstall = '' 9 | mkdir -p $out 10 | mv *.toml $out/ 11 | ''; 12 | } 13 | -------------------------------------------------------------------------------- /pkgs/buildCatppuccinPort/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenvNoCC, 4 | catppuccinInstallHook, 5 | fetchCatppuccinPort, 6 | sources, 7 | }: 8 | 9 | args: 10 | 11 | stdenvNoCC.mkDerivation ( 12 | finalAttrs: 13 | 14 | let 15 | args' = if lib.isFunction args then args finalAttrs else args; 16 | in 17 | 18 | args' 19 | // { 20 | pname = args'.pname or "catppuccin-${finalAttrs.port}"; 21 | version = 22 | args'.version 23 | or ("0" + lib.optionalString (finalAttrs ? "lastModified") "-unstable-${finalAttrs.lastModified}"); 24 | 25 | src = 26 | args'.src or sources.${finalAttrs.port} or (fetchCatppuccinPort { 27 | inherit (finalAttrs) port; 28 | inherit (finalAttrs) rev hash; 29 | fetchSubmodules = finalAttrs.fetchSubmodules or false; 30 | }); 31 | 32 | nativeBuildInputs = args'.nativeBuildInputs or [ ] ++ [ catppuccinInstallHook ]; 33 | 34 | meta = { 35 | description = "Soothing pastel theme for ${finalAttrs.port}"; 36 | homepage = "https://github.com/catppuccin/${finalAttrs.port}"; 37 | license = lib.licenses.mit; 38 | maintainers = with lib.maintainers; [ 39 | getchoo 40 | isabelroses 41 | ]; 42 | platform = lib.platforms.all; 43 | } // args'.meta or { }; 44 | } 45 | ) 46 | -------------------------------------------------------------------------------- /pkgs/catppuccinInstallHook/package.nix: -------------------------------------------------------------------------------- 1 | { makeSetupHook }: 2 | 3 | makeSetupHook { 4 | name = "catppuccin-install-hook"; 5 | } ./script.sh 6 | -------------------------------------------------------------------------------- /pkgs/catppuccinInstallHook/script.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2154 3 | 4 | catppuccinInstallPhase() { 5 | runHook preInstall 6 | 7 | local targets=() 8 | concatTo targets installTargets=themes 9 | echoCmd 'install targets' "${targets[@]}" 10 | 11 | if [ "${#targets[@]}" -gt 1 ]; then 12 | mkdir -p "$out" 13 | fi 14 | 15 | for target in "${targets[@]}"; do 16 | if [ -e "$target" ]; then 17 | mv "$target" "$out" 18 | fi 19 | done 20 | 21 | runHook postInstall 22 | } 23 | 24 | if [ -z "${dontCatppuccinInstall:-}" ] && [ -z "${installPhase:-}" ]; then 25 | installPhase=catppuccinInstallPhase 26 | fi 27 | -------------------------------------------------------------------------------- /pkgs/catwalk/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | buildPackages, 5 | fetchCatppuccinPort, 6 | installShellFiles, 7 | nix-update-script, 8 | rustPlatform, 9 | }: 10 | 11 | rustPlatform.buildRustPackage rec { 12 | pname = "catwalk"; 13 | version = "1.3.2"; 14 | 15 | src = fetchCatppuccinPort { 16 | port = "catwalk"; 17 | rev = "refs/tags/v${version}"; 18 | hash = "sha256-Yj9xTQJ0eu3Ymi2R9fgYwBJO0V+4bN4MOxXCJGQ8NjU="; 19 | }; 20 | 21 | useFetchCargoVendor = true; 22 | cargoHash = "sha256-stO8ejSC4UeEeMZZLIJ8Wabn7A6ZrWQlU5cZDSm2AVc="; 23 | 24 | nativeBuildInputs = [ installShellFiles ]; 25 | 26 | postInstall = 27 | let 28 | catwalk = stdenv.hostPlatform.emulator buildPackages + " $out/bin/catwalk"; 29 | in 30 | lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) '' 31 | installShellCompletion --cmd catwalk \ 32 | --bash <(${catwalk} completion bash) \ 33 | --fish <(${catwalk} completion fish) \ 34 | --zsh <(${catwalk} completion zsh) 35 | ''; 36 | 37 | passthru = { 38 | updateScript = nix-update-script { }; 39 | }; 40 | 41 | meta = { 42 | description = "Soothing pastel previews for the high-spirited!"; 43 | homepage = "https://catppuccin.com"; 44 | license = lib.licenses.mit; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /pkgs/cursors/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildCatppuccinPort, 4 | hyprcursor, 5 | inkscape, 6 | just, 7 | python3, 8 | whiskers, 9 | xcur2png, 10 | xorg, 11 | zip, 12 | }: 13 | 14 | buildCatppuccinPort (finalAttrs: { 15 | port = "cursors"; 16 | 17 | postPatch = "patchShebangs scripts/ build"; 18 | 19 | nativeBuildInputs = [ 20 | (python3.withPackages (p: [ p.pyside6 ])) 21 | hyprcursor 22 | inkscape 23 | just 24 | whiskers 25 | xcur2png 26 | xorg.xcursorgen 27 | zip 28 | ]; 29 | 30 | buildPhase = '' 31 | runHook preBuild 32 | 33 | just all 34 | 35 | runHook postBuild 36 | ''; 37 | 38 | installPhase = '' 39 | runHook preInstall 40 | 41 | mkdir -p $out/share 42 | mv dist $out/share/icons 43 | 44 | runHook postInstall 45 | ''; 46 | 47 | meta = { 48 | description = "Catppuccin cursor theme based on Volantes"; 49 | license = lib.licenses.gpl2; 50 | platforms = lib.platforms.linux; 51 | }; 52 | }) 53 | -------------------------------------------------------------------------------- /pkgs/delta/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "delta"; 5 | 6 | installTargets = [ 7 | "catppuccin.gitconfig" 8 | "README.md" 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /pkgs/fcitx5/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "fcitx5"; 5 | 6 | dontCatppuccinInstall = true; 7 | 8 | postInstall = '' 9 | mkdir -p $out/share/fcitx5 10 | mv src/ $out/share/fcitx5/themes/ 11 | ''; 12 | } 13 | -------------------------------------------------------------------------------- /pkgs/fetchCatppuccinPort/package.nix: -------------------------------------------------------------------------------- 1 | { lib, fetchFromGitHub }: 2 | 3 | lib.makeOverridable ( 4 | { 5 | port, 6 | rev, 7 | hash, 8 | ... 9 | }@args: 10 | 11 | let 12 | arguments = [ "port" ]; 13 | in 14 | 15 | fetchFromGitHub ( 16 | { 17 | owner = "catppuccin"; 18 | repo = port; 19 | inherit rev hash; 20 | } 21 | // lib.removeAttrs args arguments 22 | ) 23 | ) 24 | -------------------------------------------------------------------------------- /pkgs/gitea/package.nix: -------------------------------------------------------------------------------- 1 | { fetchzip }: 2 | fetchzip { 3 | url = "https://github.com/catppuccin/gitea/releases/download/v1.0.2/catppuccin-gitea.tar.gz"; 4 | hash = "sha256-rZHLORwLUfIFcB6K9yhrzr+UwdPNQVSadsw6rg8Q7gs="; 5 | stripRoot = false; 6 | } 7 | -------------------------------------------------------------------------------- /pkgs/grub/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "grub"; 5 | 6 | dontCatppuccinInstall = true; 7 | 8 | postInstall = '' 9 | mkdir -p $out/share/grub 10 | mv src $out/share/grub/themes 11 | ''; 12 | } 13 | -------------------------------------------------------------------------------- /pkgs/gtk/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildCatppuccinPort, 4 | fetchFromGitHub, 5 | git, 6 | gtk3, 7 | python3, 8 | sassc, 9 | accents ? [ "mauve" ], 10 | allAccents ? true, 11 | flavor ? "frappe", 12 | size ? "standard", 13 | tweaks ? [ ], 14 | }: 15 | 16 | buildCatppuccinPort (finalAttrs: { 17 | port = "gtk"; 18 | version = "1.0.3"; 19 | 20 | src = fetchFromGitHub { 21 | owner = "catppuccin"; 22 | repo = "gtk"; 23 | rev = "refs/tags/v${finalAttrs.version}"; 24 | hash = "sha256-8KyZtZqVVz5UKuGdLrUsR2djD3nsJDliHMtvFtUVim8="; 25 | }; 26 | 27 | postPatch = '' 28 | rmdir sources/colloid 29 | cp -r ${finalAttrs.finalPackage.colloid} sources/colloid 30 | chmod -R +w sources/colloid 31 | ''; 32 | 33 | nativeBuildInputs = [ 34 | (python3.withPackages (p: [ p.catppuccin ])) 35 | git # `git apply` is used for patches 36 | gtk3 37 | sassc 38 | ]; 39 | 40 | dontConfigure = true; 41 | dontCatppuccinInstall = true; 42 | 43 | buildFlags = 44 | [ 45 | flavor 46 | "--dest" 47 | "dist" 48 | ] 49 | ++ lib.optional allAccents "--all-accents" 50 | ++ lib.optionals (accents != [ ]) [ 51 | "--accent" 52 | (toString accents) 53 | ] 54 | ++ lib.optionals (size != [ ]) [ 55 | "--size" 56 | size 57 | ] 58 | ++ lib.optionals (tweaks != [ ]) [ 59 | "--tweaks" 60 | (toString tweaks) 61 | ]; 62 | 63 | postBuild = '' 64 | python3 build.py $buildFlags 65 | ''; 66 | 67 | postInstall = '' 68 | mkdir -p $out/share 69 | mv dist $out/share/themes 70 | ''; 71 | 72 | passthru = { 73 | colloid = fetchFromGitHub { 74 | owner = "vinceliuice"; 75 | repo = "Colloid-gtk-theme"; 76 | rev = "1a13048ea1bd4a6cb9b293b537afd16bf267e773"; 77 | hash = "sha256-zYEoOCNI74Dahlbi5fniuL5PYXcGM4cVM1T2vnnGrcc="; 78 | }; 79 | }; 80 | 81 | meta = { 82 | description = "Soothing pastel theme for GTK"; 83 | license = lib.licenses.gpl3Plus; 84 | }; 85 | }) 86 | -------------------------------------------------------------------------------- /pkgs/hyprlock/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "hyprlock"; 5 | 6 | # Make sure we aren't sourcing possibly non-existent files 7 | # or overriding our own settings 8 | postPatch = '' 9 | sed -i '1,4d' hyprlock.conf 10 | ''; 11 | 12 | installTargets = [ "hyprlock.conf" ]; 13 | } 14 | -------------------------------------------------------------------------------- /pkgs/k9s/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "k9s"; 5 | 6 | installTargets = [ "dist" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/kvantum/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildCatppuccinPort, 4 | }: 5 | 6 | buildCatppuccinPort (finalAttrs: { 7 | port = "kvantum"; 8 | 9 | dontCatppuccinInstall = true; 10 | 11 | postInstall = '' 12 | mkdir -p $out/share 13 | mv themes $out/share/Kvantum/ 14 | ''; 15 | 16 | meta = { 17 | platforms = lib.platforms.linux; 18 | }; 19 | }) 20 | -------------------------------------------------------------------------------- /pkgs/lazygit/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "lazygit"; 5 | 6 | installTargets = [ "themes-mergable" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/micro/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "micro"; 5 | 6 | installTargets = [ "src" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/nvim/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | vimUtils, 4 | sources, 5 | }: 6 | 7 | let 8 | portName = "nvim"; 9 | in 10 | 11 | vimUtils.buildVimPlugin rec { 12 | pname = "catppuccin-nvim"; 13 | version = builtins.substring 0 7 src.rev; 14 | 15 | src = sources.${portName}; 16 | 17 | nvimSkipModule = [ 18 | "catppuccin.groups.integrations.noice" 19 | "catppuccin.groups.integrations.feline" 20 | "catppuccin.lib.vim.init" 21 | ]; 22 | 23 | meta = { 24 | description = "Soothing pastel theme for ${portName}"; 25 | homepage = "https://github.com/catppuccin/${portName}"; 26 | license = lib.licenses.mit; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /pkgs/palette/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "palette"; 5 | 6 | installTargets = [ 7 | "README.md" 8 | "palette.json" 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /pkgs/paws.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nix-shell 2 | #! nix-shell --pure -i python3 -p python3 cacert nix 3 | import asyncio 4 | import argparse 5 | import json 6 | import subprocess 7 | from multiprocessing import cpu_count 8 | from datetime import datetime, timezone 9 | from pathlib import Path 10 | 11 | # Directory of the current script 12 | ROOT = Path(__file__).resolve().parent 13 | 14 | # Nix command to fetch a port with 15 | FETCH_ARGS = [ 16 | "--extra-experimental-features", 17 | "nix-command flakes", 18 | "flake", 19 | "prefetch", 20 | "--json", 21 | ] 22 | 23 | SOURCES_FILE = ROOT / "sources.json" 24 | 25 | 26 | fetch_port_sem = asyncio.Semaphore(cpu_count()) 27 | 28 | async def fetch_port(port: str) -> dict: 29 | """Fetch a Catppuccin port""" 30 | 31 | async with fetch_port_sem: 32 | repository = f"github:catppuccin/{port}" 33 | print(f"🔃 Fetching {repository}") 34 | 35 | command = FETCH_ARGS + [repository] 36 | proc = await asyncio.create_subprocess_exec("nix", *command, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.DEVNULL) 37 | stdout, _ = await proc.communicate() 38 | 39 | if proc.returncode != 0: 40 | raise Exception(f"Failed to fetch {repository}") 41 | 42 | return json.loads(stdout) 43 | 44 | 45 | def update_file_with(old_sources: dict, new_sources: dict): 46 | """Update file with new sources only when needed""" 47 | if new_sources != old_sources: 48 | with open(SOURCES_FILE, "w") as f: 49 | json.dump(new_sources, f, indent=2, sort_keys=True) 50 | else: 51 | print("⚠ No updates made") 52 | 53 | 54 | async def handle_port(sources: dict, port: str, remove=False): 55 | """Handle updating a port in the given sources""" 56 | if remove: 57 | sources.pop(port, None) 58 | print(f"💣 Removed {port}") 59 | else: 60 | data = await fetch_port(port) 61 | locked = data["locked"] 62 | last_modified = datetime.fromtimestamp(int(locked["lastModified"]), tz = timezone.utc).strftime('%Y-%m-%d') 63 | sources[port] = {"rev": locked["rev"], "hash": data["hash"], "lastModified": last_modified} 64 | 65 | 66 | async def main(): 67 | cur_sources = dict() 68 | if SOURCES_FILE.exists(): 69 | with open(SOURCES_FILE, "r") as f: 70 | cur_sources = json.load(f) 71 | 72 | parser = argparse.ArgumentParser(prog="paws") 73 | parser.add_argument("ports", default=cur_sources.keys(), nargs="*") 74 | parser.add_argument("-r", "--remove", action="store_true") 75 | args = parser.parse_args() 76 | 77 | assert ( 78 | not args.remove or len(args.ports) > 0 79 | ), "Ports must be provided when passing --remove" 80 | 81 | new_sources = cur_sources.copy() 82 | await asyncio.gather( 83 | *[handle_port(new_sources, port, remove=args.remove) for port in args.ports] 84 | ) 85 | 86 | update_file_with(cur_sources, new_sources) 87 | 88 | print("✅ Done!") 89 | 90 | 91 | asyncio.run(main()) 92 | -------------------------------------------------------------------------------- /pkgs/plymouth/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildCatppuccinPort, 4 | }: 5 | 6 | buildCatppuccinPort (finalAttrs: { 7 | port = "plymouth"; 8 | 9 | dontCatppuccinInstall = true; 10 | 11 | postPatch = '' 12 | substituteInPlace themes/**/*.plymouth \ 13 | --replace-fail '/usr' '${placeholder "out"}' 14 | ''; 15 | 16 | postInstall = '' 17 | mkdir -p $out/share/plymouth 18 | mv themes/ $out/share/plymouth/themes/ 19 | ''; 20 | 21 | meta = { 22 | license = lib.licenses.mit; 23 | platforms = lib.platforms.linux; 24 | }; 25 | }) 26 | -------------------------------------------------------------------------------- /pkgs/qutebrowser/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "qutebrowser"; 5 | 6 | installTargets = [ "setup.py" "__init__.py" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/rofi/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "rofi"; 5 | 6 | buildPhase = '' 7 | runHook preBuild 8 | 9 | # remove the @import line that is included in the file by default 10 | sed -i '1,2d' catppuccin-default.rasi 11 | 12 | runHook postBuild 13 | ''; 14 | 15 | installTargets = [ 16 | "themes" 17 | "catppuccin-default.rasi" 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /pkgs/sddm/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildCatppuccinPort, 4 | just, 5 | kdePackages, 6 | background ? null, 7 | font ? "Noto Sans", 8 | fontSize ? "9", 9 | loginBackground ? false, 10 | }: 11 | 12 | buildCatppuccinPort (finalAttrs: { 13 | port = "sddm"; 14 | 15 | postPatch = 16 | '' 17 | substituteInPlace pertheme/*.conf \ 18 | --replace-fail 'Font="Noto Sans"' 'Font="${font}"' \ 19 | --replace-fail 'FontSize=9' 'FontSize=${toString fontSize}' 20 | '' 21 | + lib.optionalString (background != null) '' 22 | substituteInPlace pertheme/*.conf \ 23 | --replace-fail 'Background="backgrounds/wall.jpg"' 'Background="${background}"' \ 24 | --replace-fail 'CustomBackground="false"' 'CustomBackground="true"' 25 | '' 26 | + lib.optionalString loginBackground '' 27 | substituteInPlace pertheme/*.conf \ 28 | --replace-fail 'LoginBackground="false"' 'LoginBackground="true"' 29 | ''; 30 | 31 | nativeBuildInputs = [ 32 | just 33 | ]; 34 | 35 | propagatedBuildInputs = [ 36 | kdePackages.qtsvg 37 | ]; 38 | 39 | dontCatppuccinInstall = true; 40 | 41 | dontWrapQtApps = true; 42 | 43 | buildPhase = '' 44 | runHook preBuild 45 | just build 46 | runHook postBuild 47 | ''; 48 | 49 | installPhase = '' 50 | runHook preInstall 51 | 52 | mkdir -p $out/share/sddm 53 | mv dist $out/share/sddm/themes 54 | 55 | runHook postInstall 56 | ''; 57 | 58 | postFixup = '' 59 | mkdir -p $out/nix-support 60 | echo ${kdePackages.qtsvg} >> $out/nix-support/propagated-user-env-packages 61 | ''; 62 | 63 | meta = { 64 | platforms = lib.platforms.linux; 65 | }; 66 | }) 67 | -------------------------------------------------------------------------------- /pkgs/sources.json: -------------------------------------------------------------------------------- 1 | { 2 | "aerc": { 3 | "hash": "sha256-OWIkHsKFts/zkrDUtbBPXHVSrHL/F0v3LB1rnlFAKmE=", 4 | "lastModified": "2024-06-26", 5 | "rev": "ca404a9f2d125ef12db40db663d43c9d94116a05" 6 | }, 7 | "alacritty": { 8 | "hash": "sha256-H8bouVCS46h0DgQ+oYY8JitahQDj0V9p2cOoD4cQX+Q=", 9 | "lastModified": "2024-10-28", 10 | "rev": "f6cb5a5c2b404cdaceaff193b9c52317f62c62f7" 11 | }, 12 | "atuin": { 13 | "hash": "sha256-t/Pq+hlCcdSigtk5uzw3n7p5ey0oH/D5S8GO/0wlpKA=", 14 | "lastModified": "2025-04-22", 15 | "rev": "abfab12de743aa73cf20ac3fa61e450c4d96380c" 16 | }, 17 | "bat": { 18 | "hash": "sha256-6fWoCH90IGumAMc4buLRWL0N61op+AuMNN9CAR9/OdI=", 19 | "lastModified": "2024-12-23", 20 | "rev": "699f60fc8ec434574ca7451b444b880430319941" 21 | }, 22 | "bottom": { 23 | "hash": "sha256-dfukdk70ug1lRGADKBnvMhkl+3tsY7F+UAwTS2Qyapk=", 24 | "lastModified": "2025-04-18", 25 | "rev": "eadd75acd0ecad4a58ade9a1d6daa3b97ccec07c" 26 | }, 27 | "btop": { 28 | "hash": "sha256-mEGZwScVPWGu+Vbtddc/sJ+mNdD2kKienGZVUcTSl+c=", 29 | "lastModified": "2024-09-23", 30 | "rev": "f437574b600f1c6d932627050b15ff5153b58fa3" 31 | }, 32 | "cava": { 33 | "hash": "sha256-5AQcCRGaAxP5KFzkJtkKFYq0Ug2xVIEqr2r/k87uWwY=", 34 | "lastModified": "2024-09-03", 35 | "rev": "0746f77974330338ee2e1e4d1ef9872eba57eb26" 36 | }, 37 | "cursors": { 38 | "hash": "sha256-qis6p+/m7+DdRDYzLq9yB2eZGpfZe5z5xRsa/1HoIG4=", 39 | "lastModified": "2025-02-22", 40 | "rev": "a7eb08527dcce01010fa0ec46fa2bc4c3154f0d4" 41 | }, 42 | "delta": { 43 | "hash": "sha256-04po0A7bVMsmYdJcKL6oL39RlMLij1lRKvWl5AUXJ7Q=", 44 | "lastModified": "2024-12-31", 45 | "rev": "e9e21cffd98787f1b59e6f6e42db599f9b8ab399" 46 | }, 47 | "dunst": { 48 | "hash": "sha256-rBp9wU6QHpmNAjeaKnI6u8rOUlv8MC70SLUzeKHN/eY=", 49 | "lastModified": "2024-12-24", 50 | "rev": "5955cf0213d14a3494ec63580a81818b6f7caa66" 51 | }, 52 | "fcitx5": { 53 | "hash": "sha256-ss0kW+ulvMhxeZKBrjQ7E5Cya+02eJrGsE4OLEkqKks=", 54 | "lastModified": "2025-05-16", 55 | "rev": "393845cf3ed0e0000bfe57fe1b9ad75748e2547f" 56 | }, 57 | "fish": { 58 | "hash": "sha256-Oc0emnIUI4LV7QJLs4B2/FQtCFewRFVp7EDv8GawFsA=", 59 | "lastModified": "2025-03-01", 60 | "rev": "6a85af2ff722ad0f9fbc8424ea0a5c454661dfed" 61 | }, 62 | "foot": { 63 | "hash": "sha256-eVH3BY2fZe0/OjqucM/IZthV8PMsM9XeIijOg8cNE1Y=", 64 | "lastModified": "2024-09-24", 65 | "rev": "962ff1a5b6387bc5419e9788a773a080eea5f1e1" 66 | }, 67 | "fuzzel": { 68 | "hash": "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=", 69 | "lastModified": "2024-10-30", 70 | "rev": "0af0e26901b60ada4b20522df739f032797b07c3" 71 | }, 72 | "gh-dash": { 73 | "hash": "sha256-fOCZxrEyWLi+VYnx3QYOP1R+VBhllhOlnO5/5Wg5aq4=", 74 | "lastModified": "2024-10-30", 75 | "rev": "acb1b1c22446e34781731ddbfb5e9bd699eccc74" 76 | }, 77 | "ghostty": { 78 | "hash": "sha256-RlgTeBkjEvZpkZbhIss3KxQcvt0goy4WU+w9d2XCOnw=", 79 | "lastModified": "2025-02-11", 80 | "rev": "9e38fc2b4e76d4ed5ff9edc5ac9e4081c7ce6ba6" 81 | }, 82 | "gitui": { 83 | "hash": "sha256-DRK/j3899qJW4qP1HKzgEtefz/tTJtwPkKtoIzuoTj0=", 84 | "lastModified": "2025-02-22", 85 | "rev": "df2f59f847e047ff119a105afff49238311b2d36" 86 | }, 87 | "glamour": { 88 | "hash": "sha256-SI/COnVFdKltMRqeqLTbR/Rh0xUJcWSqiX/YlR221eo=", 89 | "lastModified": "2025-05-02", 90 | "rev": "00c97fa3823d272d9d041d5d872ae6335555a776" 91 | }, 92 | "grub": { 93 | "hash": "sha256-20D1EcV8SWOd5BLdAc6FaQu3onha0+aS5yA/GK8Ra0g=", 94 | "lastModified": "2024-12-22", 95 | "rev": "2a5c8be8185dae49dd22030df45860df8c796312" 96 | }, 97 | "helix": { 98 | "hash": "sha256-7TJ1CDts0i3QPRWz/gvRpkXzh8wGGLW5cv9+Vg3K1zc=", 99 | "lastModified": "2025-04-03", 100 | "rev": "3b1b0b2446791812e4a76ba147223dd5f3d4319b" 101 | }, 102 | "hyprland": { 103 | "hash": "sha256-xSa/z0Pu+ioZ0gFH9qSo9P94NPkEMovstm1avJ7rvzM=", 104 | "lastModified": "2024-06-19", 105 | "rev": "c388ac55563ddeea0afe9df79d4bfff0096b146b" 106 | }, 107 | "hyprlock": { 108 | "hash": "sha256-wEWBQvn1jwYGIF9wIA8TDWJAA2/o19KjFb0TmtYbcA8=", 109 | "lastModified": "2025-04-09", 110 | "rev": "6fd5ae62624bbb7f07072cd2a79e75de62c19713" 111 | }, 112 | "imv": { 113 | "hash": "sha256-n6obxM5iVSOdlGdI8ZEmYuxudarLoZHqGETrpTcdrok=", 114 | "lastModified": "2024-01-18", 115 | "rev": "0317a097b6ec8122b1da6d02f61d0c5158019f6e" 116 | }, 117 | "k9s": { 118 | "hash": "sha256-9h+jyEO4w0OnzeEKQXJbg9dvvWGZYQAO4MbgDn6QRzM=", 119 | "lastModified": "2024-07-20", 120 | "rev": "fdbec82284744a1fc2eb3e2d24cb92ef87ffb8b4" 121 | }, 122 | "kvantum": { 123 | "hash": "sha256-9DVVUFWhKNe2x3cNVBI78Yf5reh3L22Jsu1KKpKLYsU=", 124 | "lastModified": "2025-04-21", 125 | "rev": "bc98ccaf9e64a354dd752c24605d4e3a9fe5bfd2" 126 | }, 127 | "lazygit": { 128 | "hash": "sha256-4eJEOEfwLBc4EoQ32TpuhXS3QDvQ8FtT7EgpotEKV7o=", 129 | "lastModified": "2025-04-21", 130 | "rev": "c24895902ec2a3cb62b4557f6ecd8e0afeed95d5" 131 | }, 132 | "lsd": { 133 | "hash": "sha256-lf6VawCgK9VlKO+PAzPD/WqPjxoqw2j000b5ZlEXj/Y=", 134 | "lastModified": "2024-11-28", 135 | "rev": "7085155432c7fe53a7acd7b0c004955368aa0fba" 136 | }, 137 | "mako": { 138 | "hash": "sha256-jgiZ+CrM4DX2nZR5BjjD9/Rk5CGGUy3gq9CCvYzp5Vs=", 139 | "lastModified": "2024-08-30", 140 | "rev": "92844f144e72f2dc8727879ec141ffdacf3ff6a1" 141 | }, 142 | "micro": { 143 | "hash": "sha256-+Jf32S2CHackdmx+UmEKjx71ZCf4VfnxeA3yzz3MSLQ=", 144 | "lastModified": "2024-09-08", 145 | "rev": "2802b32308e5b1a827689c095f11ae604bbc85e6" 146 | }, 147 | "mpv": { 148 | "hash": "sha256-PgiszDip99DVqUUQBMAhXxqkVThTFVX8sXaTlGyGSeE=", 149 | "lastModified": "2025-03-06", 150 | "rev": "d7eeccdcc855d1d892fb065af3bc939159208402" 151 | }, 152 | "newsboat": { 153 | "hash": "sha256-czvR3bVZ0NfBmuu0JixalS7B1vf1uEGSTSUVVTclKxI=", 154 | "lastModified": "2022-10-18", 155 | "rev": "be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f" 156 | }, 157 | "nushell": { 158 | "hash": "sha256-tQ3Br6PaLBUNIXY56nDjPkthzvgEsNzOp2gHDkZVQo0=", 159 | "lastModified": "2025-05-04", 160 | "rev": "05987d258cb765a881ee1f2f2b65276c8b379658" 161 | }, 162 | "nvim": { 163 | "hash": "sha256-u3E/vyii4zD491GEffbscMU3teDOgt3bFWaYwnaX7E0=", 164 | "lastModified": "2025-05-17", 165 | "rev": "8162a4bd9afb42837a655e404d1f937a87ba95e6" 166 | }, 167 | "obs": { 168 | "hash": "sha256-2CuaMd+9GHK18M971+pVltPC9h59LYDXEAEkEq+tRw8=", 169 | "lastModified": "2025-03-23", 170 | "rev": "58a80435caf1ff4f62b94592f508fba4c3776c97" 171 | }, 172 | "palette": { 173 | "hash": "sha256-R52Q1FVAclvBk7xNgj/Jl+GPCIbORNf6YbJ1nxH3Gzs=", 174 | "lastModified": "2025-03-17", 175 | "rev": "0df7db6fe201b437d91e7288fa22807bb0e44701" 176 | }, 177 | "plymouth": { 178 | "hash": "sha256-He6ER1QNrJCUthFoBBGHBINouW/tozxQy3R79F5tsuo=", 179 | "lastModified": "2024-10-19", 180 | "rev": "e0f58d6fcf3dbc2d35dfc4fec394217fbfa92666" 181 | }, 182 | "polybar": { 183 | "hash": "sha256-jMQ+gH1djp2euERZpVW9muHQFI7xYnEQoNpucRj7Gow=", 184 | "lastModified": "2024-07-20", 185 | "rev": "20054f39d3b77bd1afc765981a42c3467bf91204" 186 | }, 187 | "qutebrowser": { 188 | "hash": "sha256-FmxrgpFlp+cMUdCx5HHIiLMGWML23p+pfxTKT/X0UME=", 189 | "lastModified": "2025-03-14", 190 | "rev": "808adc3d7d5be6fc573d6be6e9c888cb96b5d6e6" 191 | }, 192 | "rio": { 193 | "hash": "sha256-ZliaXIM+9YbRQLz4NCoZWQVcB5ieb4tqoPAPAZEegZs=", 194 | "lastModified": "2025-04-11", 195 | "rev": "2aed2a3e545504090edde25591b5e85abad0286f" 196 | }, 197 | "rofi": { 198 | "hash": "sha256-WGYEA4Q7UvSaRDjP/DiEtfXjvmWbewtdyJWRpjhbZgg=", 199 | "lastModified": "2025-02-20", 200 | "rev": "c24a212a6b07c2d45f32d01d7f10b4d88ddc9f45" 201 | }, 202 | "sddm": { 203 | "hash": "sha256-U0bQt+enDT8de3DqGYDaFHCZVfXAP9+2hUtWvAlQi7U=", 204 | "lastModified": "2025-02-27", 205 | "rev": "9c0a84c0670ac7cf7e3afc27006455afe492160c" 206 | }, 207 | "sioyek": { 208 | "hash": "sha256-QlanYqcU/kLJqCceAgIAvXeLJ4y2kMvmzKUYxyCnC/c=", 209 | "lastModified": "2024-05-15", 210 | "rev": "3e142d195e74c1d61239e0fa2e93347d6fa5eb55" 211 | }, 212 | "spotify-player": { 213 | "hash": "sha256-eenf1jB8b2s2qeG7wAApGwkjJZWVNzQj/wEZMUgnn5U=", 214 | "lastModified": "2024-08-16", 215 | "rev": "34b3d23806770185b72466d777853c73454b85a6" 216 | }, 217 | "starship": { 218 | "hash": "sha256-1w0TJdQP5lb9jCrCmhPlSexf0PkAlcz8GBDEsRjPRns=", 219 | "lastModified": "2024-12-07", 220 | "rev": "e99ba6b210c0739af2a18094024ca0bdf4bb3225" 221 | }, 222 | "sway": { 223 | "hash": "sha256-H+ZueiYkCoBfS8JENLKhL/efFK6WFNDsbiMbTpGROUs=", 224 | "lastModified": "2024-10-14", 225 | "rev": "c072ada05271eec960dc893affe9ac55af63a745" 226 | }, 227 | "swaylock": { 228 | "hash": "sha256-AKiOeV9ggvsreC/lq2qXytUsR+x66Q0kpN2F4/Oh2Ao=", 229 | "lastModified": "2024-04-01", 230 | "rev": "77246bbbbf8926bdb8962cffab6616bc2b9e8a06" 231 | }, 232 | "thunderbird": { 233 | "hash": "sha256-07gT37m1+OhRTbUk51l0Nhx+I+tl1il5ayx2ow23APY=", 234 | "lastModified": "2024-11-01", 235 | "rev": "0289f3bd9566f9666682f66a3355155c0d0563fc" 236 | }, 237 | "tmux": { 238 | "hash": "sha256-poG3QCow2j6h/G7BLEA8v3ZJXuk28iPmH1J4t7vT55k=", 239 | "lastModified": "2025-04-18", 240 | "rev": "14a546fb64dc1141e5d02bac2185d8c1fd530d6a" 241 | }, 242 | "tofi": { 243 | "hash": "sha256-urvt0ZuCe6iEtHwMUl4K6GDLQat/lV0TqgUOlKs8ykE=", 244 | "lastModified": "2024-05-17", 245 | "rev": "d6106461867c077a5e1d25236e02b7be7c83839e" 246 | }, 247 | "waybar": { 248 | "hash": "sha256-za0y6hcN2rvN6Xjf31xLRe4PP0YyHu2i454ZPjr+lWA=", 249 | "lastModified": "2024-07-13", 250 | "rev": "ee8ed32b4f63e9c417249c109818dcc05a2e25da" 251 | }, 252 | "wezterm": { 253 | "hash": "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=", 254 | "lastModified": "2023-04-12", 255 | "rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da" 256 | }, 257 | "wlogout": { 258 | "hash": "sha256-QUSDx5M+BG7YqI4MBsOKFPxvZHQtCa8ibT0Ln4FPQ7I=", 259 | "lastModified": "2024-11-28", 260 | "rev": "b690cee13b944890e43a5fb629ccdff86cffbbb3" 261 | }, 262 | "yazi": { 263 | "hash": "sha256-ILaPj84ZlNc6MBwrpwBDNhGhXge9mPse4FYdSMU4eO8=", 264 | "lastModified": "2025-04-19", 265 | "rev": "fca8e93e0a408671fa54cc0cb103e76b85e8c011" 266 | }, 267 | "zathura": { 268 | "hash": "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI=", 269 | "lastModified": "2024-04-04", 270 | "rev": "0adc53028d81bf047461bc61c43a484d11b15220" 271 | }, 272 | "zed": { 273 | "hash": "sha256-PSuNJb1GzHVaiWKYuh5xW8ljDptjwpr/SRJoeLsCK0A=", 274 | "lastModified": "2025-04-22", 275 | "rev": "5210e6c715db13382efc667f707f7a4051d6669d" 276 | }, 277 | "zsh-syntax-highlighting": { 278 | "hash": "sha256-l6tztApzYpQ2/CiKuLBf8vI2imM6vPJuFdNDSEi7T/o=", 279 | "lastModified": "2024-07-20", 280 | "rev": "7926c3d3e17d26b3779851a2255b95ee650bd928" 281 | } 282 | } -------------------------------------------------------------------------------- /pkgs/spotify-player/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "spotify-player"; 5 | 6 | installTargets = [ 7 | "theme.toml" 8 | "README.md" 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /pkgs/swaync/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchurl, 4 | linkFarm, 5 | }: 6 | 7 | let 8 | version = "0.2.3"; 9 | 10 | artifactHashes = { 11 | "frappe.css" = "sha256-9vfro7HpA2T5bk1So8kjUKSXwe5Qnqji7bhs5ASs/Pg="; 12 | "latte.css" = "sha256-Xp7BekqhHUVTiEMMKKeEO9jlL1wtujlFSU0SINNtWZQ="; 13 | "macchiato.css" = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM="; 14 | "mocha.css" = "sha256-Hie/vDt15nGCy4XWERGy1tUIecROw17GOoasT97kIfc="; 15 | }; 16 | in 17 | 18 | linkFarm "catppuccin-swaync-${version}" ( 19 | lib.mapAttrs ( 20 | artifactName: hash: 21 | 22 | fetchurl { 23 | url = "https://github.com/catppuccin/swaync/releases/download/v${version}/${artifactName}"; 24 | inherit hash; 25 | } 26 | ) artifactHashes 27 | ) 28 | -------------------------------------------------------------------------------- /pkgs/tmux/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | sources, 4 | tmuxPlugins, 5 | }: 6 | 7 | let 8 | portName = "tmux"; 9 | in 10 | 11 | tmuxPlugins.mkTmuxPlugin rec { 12 | pluginName = "catppuccin"; 13 | version = builtins.substring 0 7 src.rev; 14 | 15 | src = sources.${portName}; 16 | 17 | meta = { 18 | description = "Soothing pastel theme for ${portName}"; 19 | homepage = "https://github.com/catppuccin/${portName}"; 20 | license = lib.licenses.mit; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /pkgs/vscode/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | vscode-utils, 4 | fetchCatppuccinPort, 5 | nodejs_22, 6 | pnpm_10, 7 | 8 | catppuccinOptions ? { }, 9 | }: 10 | 11 | let 12 | 13 | nodejs = nodejs_22; 14 | pnpm = pnpm_10.override { inherit nodejs; }; 15 | 16 | in 17 | 18 | vscode-utils.buildVscodeExtension (finalAttrs: { 19 | pname = "catppuccin-vscode"; 20 | name = finalAttrs.pname; 21 | version = "3.17.0"; 22 | 23 | src = fetchCatppuccinPort { 24 | port = "vscode"; 25 | rev = "refs/tags/@catppuccin/vscode-v${finalAttrs.version}"; 26 | hash = "sha256-TG6vZjPddZ2vTH4S81CNBI9axKS+HFwyx6GFUDUEC3U="; 27 | }; 28 | 29 | vscodeExtPublisher = "catppuccin"; 30 | vscodeExtName = "vscode"; 31 | vscodeExtUniqueId = "catppuccin.vscode"; 32 | 33 | sourceRoot = null; 34 | 35 | pnpmWorkspaces = [ "catppuccin-vsc" ]; 36 | pnpmDeps = pnpm.fetchDeps { 37 | inherit (finalAttrs) 38 | pname 39 | version 40 | src 41 | pnpmWorkspaces 42 | ; 43 | hash = "sha256-ksxzTirYEzgaQOJ+43K6SUAD/UA1b3Mtyc3HDGtMXeM="; 44 | }; 45 | 46 | nativeBuildInputs = [ 47 | nodejs 48 | pnpm.configHook 49 | ]; 50 | 51 | env = lib.optionalAttrs (catppuccinOptions != { }) { 52 | CATPPUCCIN_OPTIONS = builtins.toJSON catppuccinOptions; 53 | }; 54 | 55 | buildPhase = '' 56 | runHook preBuild 57 | 58 | pnpm --filter catppuccin-vsc core:build 59 | 60 | cd packages/catppuccin-vsc 61 | node dist/hooks/generateThemes.cjs 62 | touch ./themes/.flag 63 | 64 | runHook postBuild 65 | ''; 66 | 67 | installPhase = '' 68 | runHook preInstall 69 | 70 | mkdir -p "$out/$installPrefix" 71 | cp -rL ../../LICENSE ../../README.md package.json icon.png dist/ themes/ "$out/$installPrefix/" 72 | 73 | runHook postInstall 74 | ''; 75 | }) 76 | -------------------------------------------------------------------------------- /pkgs/wezterm/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "wezterm"; 5 | 6 | installTargets = [ "dist" "plugin" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/whiskers/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchCatppuccinPort, 4 | nix-update-script, 5 | rustPlatform, 6 | }: 7 | 8 | rustPlatform.buildRustPackage rec { 9 | pname = "whiskers"; 10 | version = "2.5.1"; 11 | 12 | src = fetchCatppuccinPort { 13 | port = "whiskers"; 14 | rev = "refs/tags/v${version}"; 15 | hash = "sha256-OLEXy9MCrPQu1KWICsYhe/ayVqxkYIFwyJoJhgiNDz4="; 16 | }; 17 | 18 | useFetchCargoVendor = true; 19 | cargoHash = "sha256-CVg7kcOTRa8KfDwiJHQhTPQfK6g3jOMa4h/BCUo3ehw="; 20 | 21 | passthru = { 22 | updateScript = nix-update-script { }; 23 | }; 24 | 25 | meta = { 26 | description = "Soothing port creation tool for the high-spirited!"; 27 | homepage = "https://catppuccin.com"; 28 | license = lib.licenses.mit; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /pkgs/wlogout/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "wlogout"; 5 | 6 | installTargets = [ 7 | "themes" 8 | "icons" 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /pkgs/zathura/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort }: 2 | 3 | buildCatppuccinPort { 4 | port = "zathura"; 5 | 6 | installTargets = [ "src" ]; 7 | } 8 | -------------------------------------------------------------------------------- /pkgs/zed/package.nix: -------------------------------------------------------------------------------- 1 | { buildCatppuccinPort, whiskers }: 2 | 3 | buildCatppuccinPort { 4 | port = "zed"; 5 | 6 | nativeBuildInputs = [ whiskers ]; 7 | 8 | buildPhase = '' 9 | runHook preBuild 10 | whiskers zed.tera 11 | runHook postBuild 12 | ''; 13 | 14 | installTargets = [ "themes" ]; 15 | } 16 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended", 5 | "schedule:weekly" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import { 3 | inherit system; 4 | config = { }; 5 | overlays = [ ]; 6 | }, 7 | system ? builtins.currentSystem, 8 | }: 9 | 10 | pkgs.mkShellNoCC { 11 | packages = [ 12 | # GHA lints 13 | pkgs.actionlint 14 | 15 | # Nix tools 16 | pkgs.deadnix 17 | pkgs.nixfmt-rfc-style 18 | pkgs.nil 19 | pkgs.statix 20 | 21 | # Python tools 22 | pkgs.pyright 23 | pkgs.ruff 24 | pkgs.ruff-lsp 25 | ]; 26 | 27 | shellHook = '' 28 | echo "Welcome to the catppuccin/nix repository! Thanks for contributing and have a wonderful day 🐈" 29 | ''; 30 | } 31 | --------------------------------------------------------------------------------