feat: limit use of IFD, add auto updates & vm testing (#40)
* feat(modules): remove unnecessary IFD by moving all upstream repos to our flake inputs, we no longer need to have [IFD](https://nixos.wiki/wiki/Import_From_Derivation) in most of our modules - making evaluation faster for all configurations. the only remaining instances of IFD are in `lib.ctp.toYAML` and the themes for kitty, which is due to it's use upstream in home-manager * ci: start auto updating flake inputs * ci: init basic vm tests * ci: rename ci to format * ci: use PAT for update-lock workflow this is required to run tests such as test-vm after the pull request is made * fix(home-manager): make sure to use readFile in helix module * ci: fix typo in test-vm * ci: use verbose logging in test-vm & enable kvm * docs: add flake inputs & vm testing to CONTRIBUTING.md * feat(modules)!: use nvfetcher for upstream sources * docs: add information about nvfetcher * chore: don't include flake-compat in flake inputs while this does make us lose out on easy updating, i think it's nice not have this as a required dependency for flake users * chore: update flake inputs Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/f58889c07efa8e1328fdf93dc1796ec2a5c47f38' (2023-07-29) → 'github:nix-community/home-manager/48b0a30202516e25d9885525fbb200a045f23f26' (2023-11-01) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28' (2023-07-28) → 'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735' (2023-10-29) * chore: update nvfetcher sources * refactor: don't instantiate nixpkgs in flake + cleanup vm test * fix(home-manager): update paths from new lazygit theme revision * feat(lib)!: use constant module arguments automatically
This commit is contained in:
parent
71f4a7d6ff
commit
a30f0ff077
33 changed files with 983 additions and 228 deletions
|
@ -1,11 +1,11 @@
|
||||||
name: CI
|
name: Format
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Check:
|
format-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
28
.github/workflows/test-vm.yml
vendored
Normal file
28
.github/workflows/test-vm.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: Test modules
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'modules/**'
|
||||||
|
- 'test.nix'
|
||||||
|
- 'flake.*'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'modules/**'
|
||||||
|
- 'test.nix'
|
||||||
|
- 'flake.*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-vm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
extra_nix_config: "system-features = benchmark big-parallel kvm nixos-test uid-range"
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
|
- name: Run VM
|
||||||
|
run: nix build -Lv .#checks.x86_64-linux.module-vm-test
|
41
.github/workflows/update-lock.yml
vendored
Normal file
41
.github/workflows/update-lock.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name: Update lockfiles
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# run every friday
|
||||||
|
- cron: "0 0 * * 5"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-locks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: cachix/install-nix-action@v22
|
||||||
|
|
||||||
|
- name: Set Git user info
|
||||||
|
run: |
|
||||||
|
git config user.name 'github-actions[bot]'
|
||||||
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
|
||||||
|
- name: Update flake inputs
|
||||||
|
run: |
|
||||||
|
nix flake update \
|
||||||
|
--commit-lock-file --commit-lockfile-summary "chore: update flake inputs"
|
||||||
|
|
||||||
|
- name: Update upstream sources
|
||||||
|
run: |
|
||||||
|
nix run nixpkgs#nvfetcher
|
||||||
|
|
||||||
|
- name: Create PR
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.LOCKFILE_TOKEN }}
|
||||||
|
base: "main"
|
||||||
|
branch: "update-lock"
|
||||||
|
delete-branch: true
|
||||||
|
committer: github-actions[bot] github-actions[bot]@users.noreply.github.com
|
||||||
|
commit-message: "chore: update nvfetcher sources"
|
||||||
|
title: "chore: update lockfiles"
|
||||||
|
body: "Automated pull request updating flake inputs and nvfetcher sources"
|
|
@ -8,6 +8,20 @@ Create a file in `modules/<module>/` with the name of the port. Add the file to
|
||||||
`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should
|
`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should
|
||||||
default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively.
|
default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively.
|
||||||
|
|
||||||
|
[nvfetcher](https://github.com/berberman/nvfetcher) is used to track our upstream
|
||||||
|
sources to use in modules. This allows us to reduce [IFD](https://nixos.wiki/wiki/Import_From_Derivation)
|
||||||
|
and auto-update all themes. Most repositories can be specified like so:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[program_name]
|
||||||
|
src.git = "https://github.com/catppuccin/program_name.git"
|
||||||
|
fetch.github = "catppuccin/program_name"
|
||||||
|
```
|
||||||
|
|
||||||
|
After creating your module, add the options to enable it in `test.nix` under the
|
||||||
|
`nodes.machine` attrset. This will allow for your configuration to be tested along
|
||||||
|
with the other modules in a VM automatically.
|
||||||
|
|
||||||
<!-- This loooks the best with the changelog generator. -->
|
<!-- This loooks the best with the changelog generator. -->
|
||||||
Commits that add ports should be of the format
|
Commits that add ports should be of the format
|
||||||
|
|
||||||
|
|
362
_sources/generated.json
Normal file
362
_sources/generated.json
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
{
|
||||||
|
"alacritty": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-09-27",
|
||||||
|
"extract": null,
|
||||||
|
"name": "alacritty",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "alacritty",
|
||||||
|
"rev": "3c808cbb4f9c87be43ba5241bc57373c793d2f17",
|
||||||
|
"sha256": "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "3c808cbb4f9c87be43ba5241bc57373c793d2f17"
|
||||||
|
},
|
||||||
|
"bat": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-11-10",
|
||||||
|
"extract": null,
|
||||||
|
"name": "bat",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "bat",
|
||||||
|
"rev": "ba4d16880d63e656acced2b7d4e034e4a93f74b1",
|
||||||
|
"sha256": "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "ba4d16880d63e656acced2b7d4e034e4a93f74b1"
|
||||||
|
},
|
||||||
|
"bottom": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-12-30",
|
||||||
|
"extract": null,
|
||||||
|
"name": "bottom",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "bottom",
|
||||||
|
"rev": "c0efe9025f62f618a407999d89b04a231ba99c92",
|
||||||
|
"sha256": "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "c0efe9025f62f618a407999d89b04a231ba99c92"
|
||||||
|
},
|
||||||
|
"btop": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-10-07",
|
||||||
|
"extract": null,
|
||||||
|
"name": "btop",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "btop",
|
||||||
|
"rev": "c6469190f2ecf25f017d6120bf4e050e6b1d17af",
|
||||||
|
"sha256": "sha256-jodJl4f2T9ViNqsY9fk8IV62CrpC5hy7WK3aRpu70Cs=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "c6469190f2ecf25f017d6120bf4e050e6b1d17af"
|
||||||
|
},
|
||||||
|
"fish": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-11-02",
|
||||||
|
"extract": null,
|
||||||
|
"name": "fish",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "fish",
|
||||||
|
"rev": "0ce27b518e8ead555dec34dd8be3df5bd75cff8e",
|
||||||
|
"sha256": "sha256-Dc/zdxfzAUM5NX8PxzfljRbYvO9f9syuLO8yBr+R3qg=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "0ce27b518e8ead555dec34dd8be3df5bd75cff8e"
|
||||||
|
},
|
||||||
|
"glamour": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-05-01",
|
||||||
|
"extract": null,
|
||||||
|
"name": "glamour",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "glamour",
|
||||||
|
"rev": "3ef2c9533b6d3c4d6309a850765500179cf32d1c",
|
||||||
|
"sha256": "sha256-HD7g9unpRYLIj00FOqLiiInMYgGgYujjvAeYOa+V76Y=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "3ef2c9533b6d3c4d6309a850765500179cf32d1c"
|
||||||
|
},
|
||||||
|
"grub": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-12-29",
|
||||||
|
"extract": null,
|
||||||
|
"name": "grub",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "grub",
|
||||||
|
"rev": "803c5df0e83aba61668777bb96d90ab8f6847106",
|
||||||
|
"sha256": "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "803c5df0e83aba61668777bb96d90ab8f6847106"
|
||||||
|
},
|
||||||
|
"gtk": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-10-05",
|
||||||
|
"extract": null,
|
||||||
|
"name": "gtk",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "gtk",
|
||||||
|
"rev": "9082969c1c33b0dc8d8e9a8a241d029f2d864599",
|
||||||
|
"sha256": "sha256-95H/jWbaDYX+tdhLODMcKunh2EXelf5Wd/vG9ZKFdSc=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "9082969c1c33b0dc8d8e9a8a241d029f2d864599"
|
||||||
|
},
|
||||||
|
"helix": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-10-20",
|
||||||
|
"extract": null,
|
||||||
|
"name": "helix",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "helix",
|
||||||
|
"rev": "8313c7250fcbbb22c6680db332669073ec6b28c2",
|
||||||
|
"sha256": "sha256-qEXhj/Mpm+aqThqEq5DlPJD8nsbPov9CNMgG9s4E02g=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "8313c7250fcbbb22c6680db332669073ec6b28c2"
|
||||||
|
},
|
||||||
|
"kitty": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-06-09",
|
||||||
|
"extract": null,
|
||||||
|
"name": "kitty",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "kitty",
|
||||||
|
"rev": "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda",
|
||||||
|
"sha256": "sha256-uZSx+fuzcW//5/FtW98q7G4xRRjJjD5aQMbvJ4cs94U=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda"
|
||||||
|
},
|
||||||
|
"lazygit": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-09-19",
|
||||||
|
"extract": null,
|
||||||
|
"name": "lazygit",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "lazygit",
|
||||||
|
"rev": "0543c28e8af1a935f8c512ad9451facbcc17d8a8",
|
||||||
|
"sha256": "sha256-OVihY5E+elPKag2H4RyWiSv+MdIqHtfGNM3/1u2ik6U=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "0543c28e8af1a935f8c512ad9451facbcc17d8a8"
|
||||||
|
},
|
||||||
|
"mako": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-08-12",
|
||||||
|
"extract": null,
|
||||||
|
"name": "mako",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "mako",
|
||||||
|
"rev": "9dd088aa5f4529a3dd4d9760415e340664cb86df",
|
||||||
|
"sha256": "sha256-nUzWkQVsIH4rrCFSP87mXAka6P+Td2ifNbTuP7NM/SQ=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "9dd088aa5f4529a3dd4d9760415e340664cb86df"
|
||||||
|
},
|
||||||
|
"micro": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-09-27",
|
||||||
|
"extract": null,
|
||||||
|
"name": "micro",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "micro",
|
||||||
|
"rev": "ed8ef015f97c357575b5013e18042c9faa6c068a",
|
||||||
|
"sha256": "sha256-/JwZ+5bLYjZWcV5vH22daLqVWbyJelqRyGa7V0b7EG8=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "ed8ef015f97c357575b5013e18042c9faa6c068a"
|
||||||
|
},
|
||||||
|
"neovim": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-11-01",
|
||||||
|
"extract": null,
|
||||||
|
"name": "neovim",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "nvim",
|
||||||
|
"rev": "40dc9f0621c55bd40da4ad0731fac44d15bb393a",
|
||||||
|
"sha256": "sha256-m1SYlSUVO9BbxUzPZ1VFkfCSHVTYSp65TX3mUm+kjeo=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "40dc9f0621c55bd40da4ad0731fac44d15bb393a"
|
||||||
|
},
|
||||||
|
"polybar": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2022-10-05",
|
||||||
|
"extract": null,
|
||||||
|
"name": "polybar",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "polybar",
|
||||||
|
"rev": "9ee66f83335404186ce979bac32fcf3cd047396a",
|
||||||
|
"sha256": "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "9ee66f83335404186ce979bac32fcf3cd047396a"
|
||||||
|
},
|
||||||
|
"starship": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-07-13",
|
||||||
|
"extract": null,
|
||||||
|
"name": "starship",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "starship",
|
||||||
|
"rev": "5629d2356f62a9f2f8efad3ff37476c19969bd4f",
|
||||||
|
"sha256": "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "5629d2356f62a9f2f8efad3ff37476c19969bd4f"
|
||||||
|
},
|
||||||
|
"sway": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-08-20",
|
||||||
|
"extract": null,
|
||||||
|
"name": "sway",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "sway",
|
||||||
|
"rev": "c976222e5cacbba7946fb82163944924bd5fac12",
|
||||||
|
"sha256": "sha256-VEyjHFjNFQQB20NGciO8y2m/rWkASzQZQekzGZ88pLg=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "c976222e5cacbba7946fb82163944924bd5fac12"
|
||||||
|
},
|
||||||
|
"tmux": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": "2023-11-01",
|
||||||
|
"extract": null,
|
||||||
|
"name": "tmux",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "tmux",
|
||||||
|
"rev": "47e33044b4b47b1c1faca1e42508fc92be12131a",
|
||||||
|
"sha256": "sha256-kn3kf7eiiwXj57tgA7fs5N2+B2r441OtBlM8IBBLl4I=",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"version": "47e33044b4b47b1c1faca1e42508fc92be12131a"
|
||||||
|
}
|
||||||
|
}
|
220
_sources/generated.nix
Normal file
220
_sources/generated.nix
Normal file
|
@ -0,0 +1,220 @@
|
||||||
|
# This file was generated by nvfetcher, please do not modify it manually.
|
||||||
|
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
|
||||||
|
{
|
||||||
|
alacritty = {
|
||||||
|
pname = "alacritty";
|
||||||
|
version = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "alacritty";
|
||||||
|
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=";
|
||||||
|
};
|
||||||
|
date = "2022-09-27";
|
||||||
|
};
|
||||||
|
bat = {
|
||||||
|
pname = "bat";
|
||||||
|
version = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "bat";
|
||||||
|
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||||
|
};
|
||||||
|
date = "2022-11-10";
|
||||||
|
};
|
||||||
|
bottom = {
|
||||||
|
pname = "bottom";
|
||||||
|
version = "c0efe9025f62f618a407999d89b04a231ba99c92";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "bottom";
|
||||||
|
rev = "c0efe9025f62f618a407999d89b04a231ba99c92";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ=";
|
||||||
|
};
|
||||||
|
date = "2022-12-30";
|
||||||
|
};
|
||||||
|
btop = {
|
||||||
|
pname = "btop";
|
||||||
|
version = "c6469190f2ecf25f017d6120bf4e050e6b1d17af";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "btop";
|
||||||
|
rev = "c6469190f2ecf25f017d6120bf4e050e6b1d17af";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-jodJl4f2T9ViNqsY9fk8IV62CrpC5hy7WK3aRpu70Cs=";
|
||||||
|
};
|
||||||
|
date = "2023-10-07";
|
||||||
|
};
|
||||||
|
fish = {
|
||||||
|
pname = "fish";
|
||||||
|
version = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "fish";
|
||||||
|
rev = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-Dc/zdxfzAUM5NX8PxzfljRbYvO9f9syuLO8yBr+R3qg=";
|
||||||
|
};
|
||||||
|
date = "2023-11-02";
|
||||||
|
};
|
||||||
|
glamour = {
|
||||||
|
pname = "glamour";
|
||||||
|
version = "3ef2c9533b6d3c4d6309a850765500179cf32d1c";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "glamour";
|
||||||
|
rev = "3ef2c9533b6d3c4d6309a850765500179cf32d1c";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-HD7g9unpRYLIj00FOqLiiInMYgGgYujjvAeYOa+V76Y=";
|
||||||
|
};
|
||||||
|
date = "2023-05-01";
|
||||||
|
};
|
||||||
|
grub = {
|
||||||
|
pname = "grub";
|
||||||
|
version = "803c5df0e83aba61668777bb96d90ab8f6847106";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "grub";
|
||||||
|
rev = "803c5df0e83aba61668777bb96d90ab8f6847106";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=";
|
||||||
|
};
|
||||||
|
date = "2022-12-29";
|
||||||
|
};
|
||||||
|
gtk = {
|
||||||
|
pname = "gtk";
|
||||||
|
version = "9082969c1c33b0dc8d8e9a8a241d029f2d864599";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "gtk";
|
||||||
|
rev = "9082969c1c33b0dc8d8e9a8a241d029f2d864599";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-95H/jWbaDYX+tdhLODMcKunh2EXelf5Wd/vG9ZKFdSc=";
|
||||||
|
};
|
||||||
|
date = "2023-10-05";
|
||||||
|
};
|
||||||
|
helix = {
|
||||||
|
pname = "helix";
|
||||||
|
version = "8313c7250fcbbb22c6680db332669073ec6b28c2";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "helix";
|
||||||
|
rev = "8313c7250fcbbb22c6680db332669073ec6b28c2";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-qEXhj/Mpm+aqThqEq5DlPJD8nsbPov9CNMgG9s4E02g=";
|
||||||
|
};
|
||||||
|
date = "2023-10-20";
|
||||||
|
};
|
||||||
|
kitty = {
|
||||||
|
pname = "kitty";
|
||||||
|
version = "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "kitty";
|
||||||
|
rev = "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-uZSx+fuzcW//5/FtW98q7G4xRRjJjD5aQMbvJ4cs94U=";
|
||||||
|
};
|
||||||
|
date = "2023-06-09";
|
||||||
|
};
|
||||||
|
lazygit = {
|
||||||
|
pname = "lazygit";
|
||||||
|
version = "0543c28e8af1a935f8c512ad9451facbcc17d8a8";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "lazygit";
|
||||||
|
rev = "0543c28e8af1a935f8c512ad9451facbcc17d8a8";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-OVihY5E+elPKag2H4RyWiSv+MdIqHtfGNM3/1u2ik6U=";
|
||||||
|
};
|
||||||
|
date = "2023-09-19";
|
||||||
|
};
|
||||||
|
mako = {
|
||||||
|
pname = "mako";
|
||||||
|
version = "9dd088aa5f4529a3dd4d9760415e340664cb86df";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "mako";
|
||||||
|
rev = "9dd088aa5f4529a3dd4d9760415e340664cb86df";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-nUzWkQVsIH4rrCFSP87mXAka6P+Td2ifNbTuP7NM/SQ=";
|
||||||
|
};
|
||||||
|
date = "2023-08-12";
|
||||||
|
};
|
||||||
|
micro = {
|
||||||
|
pname = "micro";
|
||||||
|
version = "ed8ef015f97c357575b5013e18042c9faa6c068a";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "micro";
|
||||||
|
rev = "ed8ef015f97c357575b5013e18042c9faa6c068a";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-/JwZ+5bLYjZWcV5vH22daLqVWbyJelqRyGa7V0b7EG8=";
|
||||||
|
};
|
||||||
|
date = "2022-09-27";
|
||||||
|
};
|
||||||
|
neovim = {
|
||||||
|
pname = "neovim";
|
||||||
|
version = "40dc9f0621c55bd40da4ad0731fac44d15bb393a";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "nvim";
|
||||||
|
rev = "40dc9f0621c55bd40da4ad0731fac44d15bb393a";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-m1SYlSUVO9BbxUzPZ1VFkfCSHVTYSp65TX3mUm+kjeo=";
|
||||||
|
};
|
||||||
|
date = "2023-11-01";
|
||||||
|
};
|
||||||
|
polybar = {
|
||||||
|
pname = "polybar";
|
||||||
|
version = "9ee66f83335404186ce979bac32fcf3cd047396a";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "polybar";
|
||||||
|
rev = "9ee66f83335404186ce979bac32fcf3cd047396a";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA=";
|
||||||
|
};
|
||||||
|
date = "2022-10-05";
|
||||||
|
};
|
||||||
|
starship = {
|
||||||
|
pname = "starship";
|
||||||
|
version = "5629d2356f62a9f2f8efad3ff37476c19969bd4f";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "starship";
|
||||||
|
rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
|
||||||
|
};
|
||||||
|
date = "2023-07-13";
|
||||||
|
};
|
||||||
|
sway = {
|
||||||
|
pname = "sway";
|
||||||
|
version = "c976222e5cacbba7946fb82163944924bd5fac12";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "sway";
|
||||||
|
rev = "c976222e5cacbba7946fb82163944924bd5fac12";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-VEyjHFjNFQQB20NGciO8y2m/rWkASzQZQekzGZ88pLg=";
|
||||||
|
};
|
||||||
|
date = "2023-08-20";
|
||||||
|
};
|
||||||
|
tmux = {
|
||||||
|
pname = "tmux";
|
||||||
|
version = "47e33044b4b47b1c1faca1e42508fc92be12131a";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "tmux";
|
||||||
|
rev = "47e33044b4b47b1c1faca1e42508fc92be12131a";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
sha256 = "sha256-kn3kf7eiiwXj57tgA7fs5N2+B2r441OtBlM8IBBLl4I=";
|
||||||
|
};
|
||||||
|
date = "2023-11-01";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
(import
|
(import
|
||||||
(
|
(
|
||||||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
|
||||||
fetchTarball {
|
fetchTarball {
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";
|
||||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
sha256 = "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=";
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
{ src = ./.; }
|
{ src = ./.; }
|
||||||
|
|
30
flake.lock
30
flake.lock
|
@ -1,28 +1,32 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
"home-manager": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1698873617,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-FfGFcfbULwbK1vD+H0rslIOfmy4g8f2hXiPkQG3ZCTk=",
|
||||||
"owner": "edolstra",
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "home-manager",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "48b0a30202516e25d9885525fbb200a045f23f26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685655444,
|
"lastModified": 1698611440,
|
||||||
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
|
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
|
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -33,7 +37,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
48
flake.nix
48
flake.nix
|
@ -1,14 +1,16 @@
|
||||||
{
|
{
|
||||||
description = "Soothing pastel theme for Nix";
|
description = "Soothing pastel theme for Nix";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
flake-compat = {
|
|
||||||
url = "github:edolstra/flake-compat";
|
home-manager = {
|
||||||
flake = false;
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
let
|
let
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
|
@ -19,19 +21,29 @@
|
||||||
|
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgsFor.${s});
|
forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgs.legacyPackages.${s});
|
||||||
nixpkgsFor = lib.genAttrs systems (system: import nixpkgs { inherit system; });
|
|
||||||
|
sources = pkgs:
|
||||||
|
let
|
||||||
|
s =
|
||||||
|
import ./_sources/generated.nix { inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; };
|
||||||
|
in
|
||||||
|
builtins.mapAttrs (_: p: p.src) s;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
checks = forAllSystems (pkgs: lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
|
module-vm-test = pkgs.nixosTest (import ./test.nix { inherit self inputs; });
|
||||||
|
});
|
||||||
|
|
||||||
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
|
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
|
||||||
|
|
||||||
homeManagerModules.catppuccin = import ./modules/home-manager nixpkgs;
|
homeManagerModules.catppuccin = import ./modules/home-manager { inherit inputs sources; };
|
||||||
|
|
||||||
nixosModules.catppuccin = import ./modules/nixos nixpkgs;
|
nixosModules.catppuccin = import ./modules/nixos { inherit inputs sources; };
|
||||||
|
|
||||||
packages = forAllSystems (pkgs:
|
packages = forAllSystems (pkgs:
|
||||||
let
|
let
|
||||||
mkEval = module: lib.evalModules {
|
eval = module: lib.evalModules {
|
||||||
modules = [
|
modules = [
|
||||||
module
|
module
|
||||||
{
|
{
|
||||||
|
@ -43,25 +55,23 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDoc = name: options:
|
mkDoc = name: module:
|
||||||
let
|
let
|
||||||
doc = pkgs.nixosOptionsDoc {
|
doc = pkgs.nixosOptionsDoc {
|
||||||
options = lib.filterAttrs (n: _: n != "_module") options;
|
options = lib.filterAttrs (n: _: n != "_module") (eval module).options;
|
||||||
documentType = "none";
|
documentType = "none";
|
||||||
revision = if self ? rev then builtins.substring 0 7 self.rev else "dirty";
|
revision = builtins.substring 0 7 self.rev or "dirty";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
pkgs.runCommand "${name}-module-doc.md" { } ''
|
pkgs.runCommand "${name}-module-doc.md" { } ''
|
||||||
cat ${doc.optionsCommonMark} > $out
|
cat ${doc.optionsCommonMark} > $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hmEval = mkEval self.homeManagerModules.catppuccin;
|
|
||||||
nixosEval = mkEval self.nixosModules.catppuccin;
|
|
||||||
in
|
in
|
||||||
rec {
|
{
|
||||||
nixos-doc = mkDoc "nixos" nixosEval.options;
|
nixos-doc = mkDoc "nixos" self.nixosModules.catppuccin;
|
||||||
home-manager-doc = mkDoc "home-manager" hmEval.options;
|
home-manager-doc = mkDoc "home-manager" self.homeManagerModules.catppuccin;
|
||||||
default = home-manager-doc;
|
|
||||||
|
default = self.packages.${pkgs.system}.home-manager-doc;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -10,19 +10,11 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.alacritty.catppuccin =
|
options.programs.alacritty.catppuccin =
|
||||||
ctp.mkCatppuccinOpt "alacritty" config;
|
ctp.mkCatppuccinOpt "alacritty";
|
||||||
|
|
||||||
config.programs.alacritty.settings =
|
config.programs.alacritty.settings =
|
||||||
let
|
let
|
||||||
file =
|
file = "${sources.alacritty}/catppuccin-${cfg.flavour}.yml";
|
||||||
pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "alacritty";
|
|
||||||
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
|
|
||||||
sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=";
|
|
||||||
}
|
|
||||||
+ "/catppuccin-${cfg.flavour}.yml";
|
|
||||||
in
|
in
|
||||||
lib.mkIf enable (ctp.fromYaml pkgs file);
|
lib.mkIf enable (ctp.fromYaml file);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,24 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.programs.bat.catppuccin;
|
cfg = config.programs.bat.catppuccin;
|
||||||
enable = cfg.enable && config.programs.bat.enable;
|
enable = cfg.enable && config.programs.bat.enable;
|
||||||
|
themeName = "Catppuccin-${cfg.flavour}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.bat.catppuccin =
|
options.programs.bat.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "bat" config;
|
lib.ctp.mkCatppuccinOpt "bat";
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf enable {
|
||||||
programs.bat = lib.mkIf enable {
|
programs.bat = {
|
||||||
config.theme = "Catppuccin-${cfg.flavour}";
|
config.theme = themeName;
|
||||||
themes."Catppuccin-${cfg.flavour}" = {
|
|
||||||
src =
|
themes.${themeName} = {
|
||||||
pkgs.fetchFromGitHub
|
src = sources.bat;
|
||||||
{
|
file = "${themeName}.tmTheme";
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "bat";
|
|
||||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
|
||||||
hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
|
||||||
};
|
|
||||||
file = "Catppuccin-${cfg.flavour}.tmTheme";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins) fromTOML readFile;
|
|
||||||
cfg = config.programs.bottom.catppuccin;
|
cfg = config.programs.bottom.catppuccin;
|
||||||
enable = cfg.enable && config.programs.bottom.enable;
|
enable = cfg.enable && config.programs.bottom.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.bottom.catppuccin =
|
options.programs.bottom.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "bottom" config;
|
lib.ctp.mkCatppuccinOpt "bottom";
|
||||||
|
|
||||||
config.programs.bottom.settings = lib.mkIf enable (fromTOML (readFile (pkgs.fetchFromGitHub
|
config = lib.mkIf enable {
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
programs.bottom = {
|
||||||
repo = "bottom";
|
|
||||||
rev = "c0efe9025f62f618a407999d89b04a231ba99c92";
|
settings = builtins.fromTOML (
|
||||||
sha256 = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ=";
|
builtins.readFile "${sources.bottom}/themes/${cfg.flavour}.toml"
|
||||||
}
|
);
|
||||||
+ "/themes/${cfg.flavour}.toml")));
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,21 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
|
||||||
cfg = config.programs.btop.catppuccin;
|
cfg = config.programs.btop.catppuccin;
|
||||||
enable = cfg.enable && config.programs.btop.enable;
|
enable = cfg.enable && config.programs.btop.enable;
|
||||||
|
|
||||||
themeFile = "catppuccin_${cfg.flavour}.theme";
|
themeFile = "catppuccin_${cfg.flavour}.theme";
|
||||||
themePath = "/themes/${themeFile}";
|
themePath = "/themes/${themeFile}";
|
||||||
theme =
|
theme = sources.btop + themePath;
|
||||||
pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "btop";
|
|
||||||
rev = "7109eac2884e9ca1dae431c0d7b8bc2a7ce54e54";
|
|
||||||
sha256 = "sha256-QoPPx4AzxJMYo/prqmWD/CM7e5vn/ueyx+XQ5+YfHF8=";
|
|
||||||
}
|
|
||||||
+ themePath;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.btop.catppuccin =
|
options.programs.btop.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "btop" config;
|
lib.ctp.mkCatppuccinOpt "btop";
|
||||||
|
|
||||||
config = mkIf enable
|
config = lib.mkIf enable
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
# xdg is required for this to work
|
# xdg is required for this to work
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
nixpkgs: { config
|
{ inputs, ... }@flakeArgs: { lib, pkgs, ... }@systemArgs:
|
||||||
, pkgs
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
extendedLib = import ../lib/mkExtLib.nix nixpkgs.lib;
|
extendedLib = import ../lib/mkExtLib.nix inputs.nixpkgs.lib (flakeArgs // systemArgs);
|
||||||
inherit (extendedLib) ctp;
|
inherit (extendedLib) ctp;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -30,7 +26,7 @@ in
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
extendedLib.ctp.mapModules config pkgs extendedLib files;
|
extendedLib.ctp.mapModules extendedLib files;
|
||||||
|
|
||||||
options.catppuccin = {
|
options.catppuccin = {
|
||||||
flavour = lib.mkOption {
|
flavour = lib.mkOption {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -8,25 +8,22 @@ let
|
||||||
cfg = config.programs.fish.catppuccin;
|
cfg = config.programs.fish.catppuccin;
|
||||||
enable = cfg.enable && config.programs.fish.enable;
|
enable = cfg.enable && config.programs.fish.enable;
|
||||||
|
|
||||||
theme = pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "fish";
|
|
||||||
rev = "91e6d6721362be05a5c62e235ed8517d90c567c9";
|
|
||||||
sha256 = "sha256-l9V7YMfJWhKDL65dNbxaddhaM6GJ0CFZ6z+4R6MJwBA=";
|
|
||||||
};
|
|
||||||
themeName = "Catppuccin ${ctp.mkUpper cfg.flavour}";
|
themeName = "Catppuccin ${ctp.mkUpper cfg.flavour}";
|
||||||
|
themePath = "/themes/${themeName}.theme";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt "fish" config;
|
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt "fish";
|
||||||
|
|
||||||
# xdg is required for this to work
|
# xdg is required for this to work
|
||||||
config = mkIf enable {
|
config = mkIf enable {
|
||||||
xdg.enable = lib.mkForce true;
|
xdg = {
|
||||||
|
enable = lib.mkForce true;
|
||||||
|
|
||||||
|
configFile."fish${themePath}".source = "${sources.fish}${themePath}";
|
||||||
|
};
|
||||||
|
|
||||||
programs.fish.shellInit = ''
|
programs.fish.shellInit = ''
|
||||||
fish_config theme choose "${themeName}"
|
fish_config theme choose "${themeName}"
|
||||||
'';
|
'';
|
||||||
xdg.configFile."fish/themes/${themeName}.theme".source = "${theme}/themes/${themeName}.theme";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
, pkgs
|
||||||
, lib
|
, lib
|
||||||
,
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.programs.glamour.catppuccin;
|
cfg = config.programs.glamour.catppuccin;
|
||||||
enable = cfg.enable;
|
inherit (cfg) enable;
|
||||||
|
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.glamour.catppuccin =
|
options.programs.glamour.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "glamour" config;
|
lib.ctp.mkCatppuccinOpt "glamour";
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.sessionVariables = lib.mkIf enable {
|
home.sessionVariables = lib.mkIf enable {
|
||||||
|
|
|
@ -10,9 +10,9 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.gtk.catppuccin =
|
options.gtk.catppuccin =
|
||||||
ctp.mkCatppuccinOpt "gtk" config
|
ctp.mkCatppuccinOpt "gtk"
|
||||||
// {
|
// {
|
||||||
accent = ctp.mkAccentOpt "gtk" config;
|
accent = ctp.mkAccentOpt "gtk";
|
||||||
size = mkOption {
|
size = mkOption {
|
||||||
type = types.enum [ "standard" "compact" ];
|
type = types.enum [ "standard" "compact" ];
|
||||||
default = "standard";
|
default = "standard";
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins) fromTOML readFile;
|
|
||||||
cfg = config.programs.helix.catppuccin;
|
cfg = config.programs.helix.catppuccin;
|
||||||
enable = cfg.enable && config.programs.helix.enable;
|
enable = cfg.enable && config.programs.helix.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.helix.catppuccin = with lib;
|
options.programs.helix.catppuccin = with lib;
|
||||||
ctp.mkCatppuccinOpt "helix" config
|
ctp.mkCatppuccinOpt "helix"
|
||||||
// {
|
// {
|
||||||
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
|
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
|
||||||
};
|
};
|
||||||
|
@ -28,13 +27,7 @@ in
|
||||||
editor.color-modes = lib.mkDefault true;
|
editor.color-modes = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
themes."catppuccin-${cfg.flavour}" = fromTOML (readFile (pkgs.fetchFromGitHub
|
themes."catppuccin-${cfg.flavour}" = builtins.fromTOML
|
||||||
{
|
(builtins.readFile "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavour}.toml");
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "helix";
|
|
||||||
rev = "5677c16dc95297a804caea9161072ff174018fdd";
|
|
||||||
sha256 = "sha256-aa8KZ7/1TXcBqaV/TYOZ8rpusOf5QeQ9i2Upnncbziw=";
|
|
||||||
}
|
|
||||||
+ "/themes/${subdir}/catppuccin_${cfg.flavour}.toml"));
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.kitty.catppuccin =
|
options.programs.kitty.catppuccin =
|
||||||
ctp.mkCatppuccinOpt "kitty" config;
|
ctp.mkCatppuccinOpt "kitty";
|
||||||
|
|
||||||
config.programs.kitty =
|
config.programs.kitty =
|
||||||
lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; };
|
lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; };
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
inherit (lib) ctp;
|
||||||
cfg = config.programs.lazygit.catppuccin;
|
cfg = config.programs.lazygit.catppuccin;
|
||||||
enable = cfg.enable && config.programs.lazygit.enable;
|
enable = cfg.enable && config.programs.lazygit.enable;
|
||||||
|
|
||||||
|
themePath = "/${cfg.flavour}/${cfg.accent}.yml";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.lazygit.catppuccin =
|
options.programs.lazygit.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "lazygit" config;
|
lib.ctp.mkCatppuccinOpt "lazygit" // {
|
||||||
|
accent = ctp.mkAccentOpt "lazygit";
|
||||||
|
|
||||||
config.programs.lazygit.settings =
|
};
|
||||||
let
|
|
||||||
file =
|
config = lib.mkIf enable {
|
||||||
pkgs.fetchFromGitHub
|
|
||||||
{
|
programs.lazygit.settings = lib.ctp.fromYaml "${sources.lazygit}/themes/${themePath}";
|
||||||
owner = "catppuccin";
|
};
|
||||||
repo = "lazygit";
|
|
||||||
rev = "f01edfd57fa2aa7cd69a92537a613bb3c91e65dd";
|
|
||||||
sha256 = "sha256-zjzDtXcGtUon4QbrZnlAPzngEyH56yy8TCyFv0rIbOA=";
|
|
||||||
}
|
|
||||||
+ "/themes/${cfg.flavour}.yml";
|
|
||||||
in
|
|
||||||
lib.mkIf enable (lib.ctp.fromYaml pkgs file);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
, pkgs
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -8,20 +9,14 @@ let
|
||||||
|
|
||||||
cfg = config.services.mako.catppuccin;
|
cfg = config.services.mako.catppuccin;
|
||||||
enable = cfg.enable && config.services.mako.enable;
|
enable = cfg.enable && config.services.mako.enable;
|
||||||
theme = lib.ctp.fromINI pkgs (pkgs.fetchFromGitHub
|
theme = lib.ctp.fromINI (sources.mako + /src/${cfg.flavour});
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "mako";
|
|
||||||
rev = "9dd088aa5f4529a3dd4d9760415e340664cb86df";
|
|
||||||
hash = "sha256-nUzWkQVsIH4rrCFSP87mXAka6P+Td2ifNbTuP7NM/SQ=";
|
|
||||||
} + /src/${cfg.flavour});
|
|
||||||
|
|
||||||
# Settings that need to be extracted and put in extraConfig
|
# Settings that need to be extracted and put in extraConfig
|
||||||
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
|
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.mako.catppuccin =
|
options.services.mako.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "mako" config;
|
lib.ctp.mkCatppuccinOpt "mako";
|
||||||
|
|
||||||
# Will cause infinite recursion if config.services.mako is directly set as a whole
|
# Will cause infinite recursion if config.services.mako is directly set as a whole
|
||||||
config.services.mako = lib.mkIf enable {
|
config.services.mako = lib.mkIf enable {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -8,19 +8,10 @@ let
|
||||||
enable = cfg.enable && config.programs.micro.enable;
|
enable = cfg.enable && config.programs.micro.enable;
|
||||||
|
|
||||||
themePath = "catppuccin-${cfg.flavour}.micro";
|
themePath = "catppuccin-${cfg.flavour}.micro";
|
||||||
theme =
|
|
||||||
pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "micro";
|
|
||||||
rev = "ed8ef015f97c357575b5013e18042c9faa6c068a";
|
|
||||||
sha256 = "/JwZ+5bLYjZWcV5vH22daLqVWbyJelqRyGa7V0b7EG8=";
|
|
||||||
}
|
|
||||||
+ "/src/${themePath}";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.micro.catppuccin =
|
options.programs.micro.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "micro" config;
|
lib.ctp.mkCatppuccinOpt "micro";
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
|
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
|
||||||
|
@ -28,7 +19,7 @@ in
|
||||||
xdg = {
|
xdg = {
|
||||||
# xdg is required for this to work
|
# xdg is required for this to work
|
||||||
enable = lib.mkForce true;
|
enable = lib.mkForce true;
|
||||||
configFile."micro/colorschemes/${themePath}".source = theme;
|
configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
enable = cfg.enable && config.programs.neovim.enable;
|
enable = cfg.enable && config.programs.neovim.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.neovim.catppuccin = lib.ctp.mkCatppuccinOpt "neovim" config;
|
options.programs.neovim.catppuccin = lib.ctp.mkCatppuccinOpt "neovim";
|
||||||
|
|
||||||
config.programs.neovim = lib.mkIf enable {
|
config.programs.neovim = lib.mkIf enable {
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -9,14 +9,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.polybar.catppuccin =
|
options.services.polybar.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "polybar" config;
|
lib.ctp.mkCatppuccinOpt "polybar";
|
||||||
|
|
||||||
config.services.polybar.extraConfig = lib.mkIf enable (builtins.readFile (pkgs.fetchFromGitHub
|
config.services.polybar.extraConfig = lib.mkIf enable
|
||||||
{
|
(builtins.readFile "${sources.polybar}/themes/${cfg.flavour}.ini");
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "polybar";
|
|
||||||
rev = "9ee66f83335404186ce979bac32fcf3cd047396a";
|
|
||||||
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA=";
|
|
||||||
}
|
|
||||||
+ "/themes/${cfg.flavour}.ini"));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.starship.catppuccin =
|
options.programs.starship.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "starship" config;
|
lib.ctp.mkCatppuccinOpt "starship";
|
||||||
|
|
||||||
config.programs.starship.settings =
|
config.programs.starship.settings =
|
||||||
lib.mkIf enable
|
lib.mkIf enable
|
||||||
|
@ -18,13 +18,5 @@ in
|
||||||
format = lib.mkDefault "$all";
|
format = lib.mkDefault "$all";
|
||||||
palette = "catppuccin_${cfg.flavour}";
|
palette = "catppuccin_${cfg.flavour}";
|
||||||
}
|
}
|
||||||
// fromTOML (readFile
|
// fromTOML (readFile "${sources.starship}/palettes/${cfg.flavour}.toml"));
|
||||||
(pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "starship";
|
|
||||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc";
|
|
||||||
sha256 = "sha256-soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
|
||||||
}
|
|
||||||
+ "/palettes/${cfg.flavour}.toml")));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,16 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.wayland.windowManager.sway.catppuccin;
|
cfg = config.wayland.windowManager.sway.catppuccin;
|
||||||
enable = cfg.enable && config.wayland.windowManager.sway.enable;
|
enable = cfg.enable && config.wayland.windowManager.sway.enable;
|
||||||
theme =
|
theme = "${sources.sway}/themes/catppuccin-${cfg.flavour}";
|
||||||
pkgs.fetchFromGitHub
|
|
||||||
{
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "sway";
|
|
||||||
rev = "c89098fc3517b64f0422aaaccb98dcab6ae9348f";
|
|
||||||
sha256 = "sha256-6Cvsmdl3OILz1vZovyBIuuSpm207I3W0dmUGowR9Ugk=";
|
|
||||||
}
|
|
||||||
+ "/themes/catppuccin-${cfg.flavour}";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wayland.windowManager.sway.catppuccin =
|
options.wayland.windowManager.sway.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "sway" config;
|
lib.ctp.mkCatppuccinOpt "sway";
|
||||||
|
|
||||||
config.wayland.windowManager.sway.extraConfigEarly =
|
config.wayland.windowManager.sway.extraConfigEarly =
|
||||||
lib.mkIf enable ''
|
lib.mkIf enable ''
|
||||||
|
|
|
@ -1,30 +1,24 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.programs.tmux.catppuccin;
|
cfg = config.programs.tmux.catppuccin;
|
||||||
enable = cfg.enable && config.programs.tmux.enable;
|
enable = cfg.enable && config.programs.tmux.enable;
|
||||||
|
|
||||||
plugin = with builtins;
|
plugin =
|
||||||
with pkgs; let
|
# TODO @getchoo: upstream this in nixpkgs
|
||||||
rev = "4e48b09a76829edc7b55fbb15467cf0411f07931";
|
pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
in
|
|
||||||
tmuxPlugins.mkTmuxPlugin {
|
|
||||||
pluginName = "catppuccin";
|
pluginName = "catppuccin";
|
||||||
version = substring 0 7 rev;
|
version = builtins.substring 0 7 sources.tmux.rev;
|
||||||
src = fetchFromGitHub {
|
src = sources.tmux;
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "tmux";
|
|
||||||
inherit rev;
|
|
||||||
sha256 = "sha256-bXEsxt4ozl3cAzV3ZyvbPsnmy0RAdpLxHwN82gvjLdU=";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.tmux.catppuccin =
|
options.programs.tmux.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "tmux" config;
|
lib.ctp.mkCatppuccinOpt "tmux";
|
||||||
|
|
||||||
config.programs.tmux.plugins = lib.mkIf enable [
|
config.programs.tmux.plugins = lib.mkIf enable [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
lib:
|
lib: { config, pkgs, sources, ... }:
|
||||||
let
|
let
|
||||||
# string -> type -> string -> a -> a
|
# string -> type -> string -> a -> a
|
||||||
# this is an internal function and shouldn't be
|
# this is an internal function and shouldn't be
|
||||||
|
@ -6,7 +6,7 @@ let
|
||||||
# a string (the name of the property, i.e., flavour
|
# a string (the name of the property, i.e., flavour
|
||||||
# or accent), the type of the property, the name of
|
# or accent), the type of the property, the name of
|
||||||
# the module, followed by local config attrset
|
# the module, followed by local config attrset
|
||||||
mkBasicOpt = attr: type: name: config:
|
mkBasicOpt = attr: type: name:
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
inherit type;
|
inherit type;
|
||||||
default = config.catppuccin.${attr};
|
default = config.catppuccin.${attr};
|
||||||
|
@ -53,7 +53,7 @@ in
|
||||||
# a -> path -> a
|
# a -> path -> a
|
||||||
# fromJSON but for yaml (and without readFile)
|
# fromJSON but for yaml (and without readFile)
|
||||||
# a should be the local pkgs attrset
|
# a should be the local pkgs attrset
|
||||||
fromYaml = pkgs: file:
|
fromYaml = file:
|
||||||
let
|
let
|
||||||
inherit (builtins) fromJSON readFile;
|
inherit (builtins) fromJSON readFile;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ in
|
||||||
# a -> path -> a
|
# a -> path -> a
|
||||||
# fromJSON but for ini (and without readFile)
|
# fromJSON but for ini (and without readFile)
|
||||||
# a should be the local pkgs attrset
|
# a should be the local pkgs attrset
|
||||||
fromINI = pkgs: file:
|
fromINI = file:
|
||||||
let
|
let
|
||||||
inherit (builtins) fromJSON readFile;
|
inherit (builtins) fromJSON readFile;
|
||||||
|
|
||||||
|
@ -83,9 +83,10 @@ in
|
||||||
# a -> a -> [path] -> [path]
|
# a -> a -> [path] -> [path]
|
||||||
# this imports a list of paths while inheriting
|
# this imports a list of paths while inheriting
|
||||||
# multiple attributes
|
# multiple attributes
|
||||||
mapModules = config: pkgs: extendedLib:
|
mapModules = extendedLib:
|
||||||
map (m: (import m {
|
map (m: (import m {
|
||||||
inherit config pkgs;
|
inherit config pkgs;
|
||||||
|
sources = sources pkgs;
|
||||||
lib = extendedLib;
|
lib = extendedLib;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -94,9 +95,9 @@ in
|
||||||
# enable and flavour option. the fist string should
|
# enable and flavour option. the fist string should
|
||||||
# be the name of the module, followed by the local config
|
# be the name of the module, followed by the local config
|
||||||
# attrset
|
# attrset
|
||||||
mkCatppuccinOpt = name: config: {
|
mkCatppuccinOpt = name: {
|
||||||
enable = lib.mkEnableOption "Catppuccin theme";
|
enable = lib.mkEnableOption "Catppuccin theme";
|
||||||
flavour = mkFlavourOpt name config;
|
flavour = mkFlavourOpt name;
|
||||||
};
|
};
|
||||||
|
|
||||||
# string -> a -> a
|
# string -> a -> a
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
lib: lib.extend (self: _: { ctp = import ./. self; })
|
lib: args: lib.extend (self: _: { ctp = import ./. self args; })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
nixpkgs: { config, pkgs, lib, ... }:
|
{ inputs, ... }@flakeArgs: { lib, pkgs, ... }@systemArgs:
|
||||||
let
|
let
|
||||||
extendedLib = import ../lib/mkExtLib.nix nixpkgs.lib;
|
extendedLib = import ../lib/mkExtLib.nix inputs.nixpkgs.lib (systemArgs // flakeArgs);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -9,7 +9,7 @@ in
|
||||||
./grub.nix
|
./grub.nix
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
extendedLib.ctp.mapModules config pkgs extendedLib files;
|
extendedLib.ctp.mapModules extendedLib files;
|
||||||
|
|
||||||
|
|
||||||
options.catppuccin = with extendedLib; {
|
options.catppuccin = with extendedLib; {
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
{ config
|
{ config
|
||||||
, pkgs
|
|
||||||
, lib
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, sources
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.boot.loader.grub.catppuccin;
|
cfg = config.boot.loader.grub.catppuccin;
|
||||||
enable = cfg.enable && config.boot.loader.grub.enable;
|
enable = cfg.enable && config.boot.loader.grub.enable;
|
||||||
|
|
||||||
theme = with pkgs; let
|
# TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes
|
||||||
src = fetchFromGitHub {
|
theme = pkgs.runCommand "catppuccin-grub-theme" { } ''
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "grub";
|
|
||||||
rev = "803c5df0e83aba61668777bb96d90ab8f6847106";
|
|
||||||
sha256 = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
runCommand "catppuccin-grub-theme" { } ''
|
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cp -r ${src}/src/catppuccin-${cfg.flavour}-grub-theme/* "$out"/
|
cp -r ${sources.grub}/src/catppuccin-${cfg.flavour}-grub-theme/* "$out"/
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.boot.loader.grub.catppuccin =
|
options.boot.loader.grub.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "grub" config;
|
lib.ctp.mkCatppuccinOpt "grub";
|
||||||
|
|
||||||
config.boot.loader.grub = lib.mkIf enable {
|
config.boot.loader.grub = lib.mkIf enable {
|
||||||
font = "${theme}/font.pf2";
|
font = "${theme}/font.pf2";
|
||||||
|
|
71
nvfetcher.toml
Normal file
71
nvfetcher.toml
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
[alacritty]
|
||||||
|
src.git = "https://github.com/catppuccin/alacritty.git"
|
||||||
|
fetch.github = "catppuccin/alacritty"
|
||||||
|
|
||||||
|
[bat]
|
||||||
|
src.git = "https://github.com/catppuccin/bat.git"
|
||||||
|
fetch.github = "catppuccin/bat"
|
||||||
|
|
||||||
|
[bottom]
|
||||||
|
src.git = "https://github.com/catppuccin/bottom.git"
|
||||||
|
fetch.github = "catppuccin/bottom"
|
||||||
|
|
||||||
|
[btop]
|
||||||
|
src.git = "https://github.com/catppuccin/btop.git"
|
||||||
|
fetch.github = "catppuccin/btop"
|
||||||
|
|
||||||
|
[fish]
|
||||||
|
src.git = "https://github.com/catppuccin/fish.git"
|
||||||
|
fetch.github = "catppuccin/fish"
|
||||||
|
|
||||||
|
[glamour]
|
||||||
|
src.git = "https://github.com/catppuccin/glamour.git"
|
||||||
|
fetch.github = "catppuccin/glamour"
|
||||||
|
|
||||||
|
[grub]
|
||||||
|
src.git = "https://github.com/catppuccin/grub.git"
|
||||||
|
fetch.github = "catppuccin/grub"
|
||||||
|
|
||||||
|
[gtk]
|
||||||
|
src.git = "https://github.com/catppuccin/gtk.git"
|
||||||
|
fetch.github = "catppuccin/gtk"
|
||||||
|
|
||||||
|
[helix]
|
||||||
|
src.git = "https://github.com/catppuccin/helix.git"
|
||||||
|
fetch.github = "catppuccin/helix"
|
||||||
|
|
||||||
|
[kitty]
|
||||||
|
src.git = "https://github.com/catppuccin/kitty.git"
|
||||||
|
fetch.github = "catppuccin/kitty"
|
||||||
|
|
||||||
|
[lazygit]
|
||||||
|
src.git = "https://github.com/catppuccin/lazygit.git"
|
||||||
|
fetch.github = "catppuccin/lazygit"
|
||||||
|
|
||||||
|
[mako]
|
||||||
|
src.git = "https://github.com/catppuccin/mako.git"
|
||||||
|
fetch.github = "catppuccin/mako"
|
||||||
|
|
||||||
|
[micro]
|
||||||
|
src.git = "https://github.com/catppuccin/micro.git"
|
||||||
|
fetch.github = "catppuccin/micro"
|
||||||
|
|
||||||
|
[neovim]
|
||||||
|
src.git = "https://github.com/catppuccin/nvim.git"
|
||||||
|
fetch.github = "catppuccin/nvim"
|
||||||
|
|
||||||
|
[polybar]
|
||||||
|
src.git = "https://github.com/catppuccin/polybar.git"
|
||||||
|
fetch.github = "catppuccin/polybar"
|
||||||
|
|
||||||
|
[starship]
|
||||||
|
src.git = "https://github.com/catppuccin/starship.git"
|
||||||
|
fetch.github = "catppuccin/starship"
|
||||||
|
|
||||||
|
[sway]
|
||||||
|
src.git = "https://github.com/catppuccin/sway.git"
|
||||||
|
fetch.github = "catppuccin/sway"
|
||||||
|
|
||||||
|
[tmux]
|
||||||
|
src.git = "https://github.com/catppuccin/tmux.git"
|
||||||
|
fetch.github = "catppuccin/tmux"
|
92
test.nix
Normal file
92
test.nix
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
{ self
|
||||||
|
, inputs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
common = {
|
||||||
|
catppuccin.flavour = "mocha";
|
||||||
|
users.users.test = {
|
||||||
|
isNormalUser = true;
|
||||||
|
home = "/home/test";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ctpEnable = {
|
||||||
|
enable = true;
|
||||||
|
catppuccin.enable = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "module-test";
|
||||||
|
|
||||||
|
nodes.machine = { lib, ... }: {
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.catppuccin
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
common
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.grub = ctpEnable;
|
||||||
|
|
||||||
|
programs.dconf.enable = true; # required for gtk
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
memorySize = 4096;
|
||||||
|
writableStore = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.test = {
|
||||||
|
imports = [
|
||||||
|
self.homeManagerModules.catppuccin
|
||||||
|
];
|
||||||
|
|
||||||
|
inherit (common) catppuccin;
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "test";
|
||||||
|
stateVersion = lib.mkDefault "23.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
manual.manpages.enable = lib.mkDefault false;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
alacritty = ctpEnable;
|
||||||
|
bat = ctpEnable;
|
||||||
|
bottom = ctpEnable;
|
||||||
|
btop = ctpEnable;
|
||||||
|
fish = ctpEnable;
|
||||||
|
glamour.catppuccin.enable = true;
|
||||||
|
helix = ctpEnable;
|
||||||
|
home-manager.enable = false;
|
||||||
|
kitty = ctpEnable;
|
||||||
|
lazygit = ctpEnable;
|
||||||
|
micro = ctpEnable;
|
||||||
|
neovim = ctpEnable;
|
||||||
|
starship = ctpEnable;
|
||||||
|
tmux = ctpEnable;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = ctpEnable;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
mako = ctpEnable;
|
||||||
|
polybar =
|
||||||
|
ctpEnable
|
||||||
|
// {
|
||||||
|
script = ''
|
||||||
|
polybar top &
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway = ctpEnable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = _: ''
|
||||||
|
machine.start()
|
||||||
|
machine.wait_for_unit("home-manager-test.service")
|
||||||
|
machine.wait_until_succeeds("systemctl status home-manager-test.service")
|
||||||
|
machine.succeed("echo \"system started!\"")
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue