diff --git a/.github/checkSources.nix b/.github/checkSources.nix index db11586a..8aec3172 100644 --- a/.github/checkSources.nix +++ b/.github/checkSources.nix @@ -1,11 +1,14 @@ let - sourceFile = ../_sources/generated.json; - sources = builtins.fromJSON (builtins.readFile sourceFile); - isFromOrg = v: v.src.owner == "catppuccin"; - badSources = builtins.filter (src: !(isFromOrg src)) (builtins.attrValues sources); + sources = (builtins.fromJSON (builtins.readFile ../.sources/sources.json)).pins; + + isGithubSource = source: source.repository.type or "" == "GitHub"; + isInOrg = source: source.repository.owner or "" == "catppuccin"; + + # all github sources should be from the org + isGoodSource = source: isGithubSource source -> isInOrg source; + # find the ones that aren't + badSources = builtins.filter (source: !(isGoodSource source)) (builtins.attrValues sources); in - # error if any sources are found that don't originate - # from the catppuccin org if ((builtins.length badSources) == 0) - then "GOOD" - else builtins.throw "BAD" + then "OK" + else throw "BAD" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20006e3b..b57079f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: [main] paths: + - '.sources/**' - '**.lock' - '**.nix' pull_request: diff --git a/.github/workflows/update-lock.yml b/.github/workflows/update-lock.yml index 9bc821d4..55cd16de 100644 --- a/.github/workflows/update-lock.yml +++ b/.github/workflows/update-lock.yml @@ -44,10 +44,12 @@ jobs: popd - - name: Update upstream sources + - name: Update port sources run: | - nix run --inputs-from ./dev \ - nixpkgs#nvfetcher -- --commit-changes + nix run --inputs-from ./dev nixpkgs#npins -- update --directory ./.sources + if ! git diff --color=always --exit-code; then + git commit -am "chore: update port sources" + fi - name: Make PR if needed env: diff --git a/.github/workflows/validate-sources.yml b/.github/workflows/validate-sources.yml index 9de16dbf..a85ea803 100644 --- a/.github/workflows/validate-sources.yml +++ b/.github/workflows/validate-sources.yml @@ -5,13 +5,10 @@ name: Validate sources on: push: paths: - - '_sources/**' - - 'nvfetcher.toml' - branches: [main] + - '.sources/**' pull_request: paths: - - '_sources/**' - - 'nvfetcher.toml' + - '.sources/**' workflow_dispatch: jobs: diff --git a/.sources/default.nix b/.sources/default.nix new file mode 100644 index 00000000..4a7c3728 --- /dev/null +++ b/.sources/default.nix @@ -0,0 +1,47 @@ +# Generated by npins. Do not modify; will be overwritten regularly +let + data = builtins.fromJSON (builtins.readFile ./sources.json); + version = data.version; + + mkSource = spec: + assert spec ? type; let + path = + if spec.type == "Git" then mkGitSource spec + else if spec.type == "GitRelease" then mkGitSource spec + else if spec.type == "PyPi" then mkPyPiSource spec + else if spec.type == "Channel" then mkChannelSource spec + else builtins.throw "Unknown source type ${spec.type}"; + in + spec // { outPath = path; }; + + mkGitSource = { repository, revision, url ? null, hash, ... }: + assert repository ? type; + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository + # In the latter case, there we will always be an url to the tarball + if url != null then + (builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + }) + else assert repository.type == "Git"; builtins.fetchGit { + url = repository.url; + rev = revision; + # hash = hash; + }; + + mkPyPiSource = { url, hash, ... }: + builtins.fetchurl { + inherit url; + sha256 = hash; + }; + + mkChannelSource = { url, hash, ... }: + builtins.fetchTarball { + inherit url; + sha256 = hash; + }; +in +if version == 3 then + builtins.mapAttrs (_: mkSource) data.pins +else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/.sources/sources.json b/.sources/sources.json new file mode 100644 index 00000000..2d33d29d --- /dev/null +++ b/.sources/sources.json @@ -0,0 +1,473 @@ +{ + "pins": { + "alacritty": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "alacritty" + }, + "branch": "main", + "revision": "94800165c13998b600a9da9d29c330de9f28618e", + "url": "https://github.com/catppuccin/alacritty/archive/94800165c13998b600a9da9d29c330de9f28618e.tar.gz", + "hash": "0rj7d4aalrfv0yy1ympg3qvwjk2wygaavbha385z1h7prf4lfb9y" + }, + "bat": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "bat" + }, + "branch": "main", + "revision": "d714cc1d358ea51bfc02550dabab693f70cccea0", + "url": "https://github.com/catppuccin/bat/archive/d714cc1d358ea51bfc02550dabab693f70cccea0.tar.gz", + "hash": "1zlryg39y4dbrycjlp009vd7hx2yvn5zfb03a2vq426z78s7i423" + }, + "bottom": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "bottom" + }, + "branch": "main", + "revision": "66c540ea512187df5f0c6c97312b0c6da7225af0", + "url": "https://github.com/catppuccin/bottom/archive/66c540ea512187df5f0c6c97312b0c6da7225af0.tar.gz", + "hash": "0wni1y06l75nmb7242wza66dxf79qwcj89g87j34ln650nyrmv8r" + }, + "btop": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "btop" + }, + "branch": "main", + "revision": "c6469190f2ecf25f017d6120bf4e050e6b1d17af", + "url": "https://github.com/catppuccin/btop/archive/c6469190f2ecf25f017d6120bf4e050e6b1d17af.tar.gz", + "hash": "0ayhpfdldnmdb2xirrj2p85bcpi17kwza65b6ridakznhyblk1wf" + }, + "cava": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "cava" + }, + "branch": "main", + "revision": "56c1e69318856a853b28e3ccce500c00099dc051", + "url": "https://github.com/catppuccin/cava/archive/56c1e69318856a853b28e3ccce500c00099dc051.tar.gz", + "hash": "0saz99k2gb2xg8wl3qcfn7xxmvdp0qhbzas2mqxackxbbdh49lql" + }, + "delta": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "delta" + }, + "branch": "main", + "revision": "765eb17d0268bf07c20ca439771153f8bc79444f", + "url": "https://github.com/catppuccin/delta/archive/765eb17d0268bf07c20ca439771153f8bc79444f.tar.gz", + "hash": "00pmg2rbzsrf2k0l6d7m5394i7klvk41h6xhv8c3v56rhvv2f38q" + }, + "dunst": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "dunst" + }, + "branch": "main", + "revision": "bfec91a5d0ab02a73a4615243feb5499d376831c", + "url": "https://github.com/catppuccin/dunst/archive/bfec91a5d0ab02a73a4615243feb5499d376831c.tar.gz", + "hash": "0q3p4r3in22r3bj7npk7ww5hd14p3gwch2iqxi7sjf3bj077sby7" + }, + "fcitx5": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "fcitx5" + }, + "branch": "main", + "revision": "ce244cfdf43a648d984719fdfd1d60aab09f5c97", + "url": "https://github.com/catppuccin/fcitx5/archive/ce244cfdf43a648d984719fdfd1d60aab09f5c97.tar.gz", + "hash": "16qs60k7nskvf9v0ivz1izkiirf3fd8jscx5i0lgx3n459pq4mmq" + }, + "fish": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "fish" + }, + "branch": "main", + "revision": "0ce27b518e8ead555dec34dd8be3df5bd75cff8e", + "url": "https://github.com/catppuccin/fish/archive/0ce27b518e8ead555dec34dd8be3df5bd75cff8e.tar.gz", + "hash": "1a6yj6zhccpg5jpcrxjzxyydh5ldwlvwf3vz6lwl60gk2xvz7kqd" + }, + "foot": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "foot" + }, + "branch": "main", + "revision": "307611230661b7b1787feb7f9d122e851bae97e9", + "url": "https://github.com/catppuccin/foot/archive/307611230661b7b1787feb7f9d122e851bae97e9.tar.gz", + "hash": "0ki01m4r3rxsx0vqjylwa3i6f6k8lf1xbsx2kv1xfzbd68fdhhws" + }, + "gh-dash": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "gh-dash" + }, + "branch": "main", + "revision": "a971447dbb6e43c274ce52697c0bd381735c3c8a", + "url": "https://github.com/catppuccin/gh-dash/archive/a971447dbb6e43c274ce52697c0bd381735c3c8a.tar.gz", + "hash": "0w70py16slwcjbc96d269dpq7xkm1rv846hv2mzb7v1x1n74xcfd" + }, + "gitui": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "gitui" + }, + "branch": "main", + "revision": "39978362b2c88b636cacd55b65d2f05c45a47eb9", + "url": "https://github.com/catppuccin/gitui/archive/39978362b2c88b636cacd55b65d2f05c45a47eb9.tar.gz", + "hash": "10kwkkp2zlzzmj7c6bkhxmk21r5g5qckpw9myc9sp8dfbx1qfrli" + }, + "glamour": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "glamour" + }, + "branch": "main", + "revision": "66d7b09325af67b1c5cdb063343e829c04ad7d5f", + "url": "https://github.com/catppuccin/glamour/archive/66d7b09325af67b1c5cdb063343e829c04ad7d5f.tar.gz", + "hash": "1072gspp20qln7ladqzqahzc3c1444d9hczmafygnazpla14awkz" + }, + "grub": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "grub" + }, + "branch": "main", + "revision": "88f6124757331fd3a37c8a69473021389b7663ad", + "url": "https://github.com/catppuccin/grub/archive/88f6124757331fd3a37c8a69473021389b7663ad.tar.gz", + "hash": "0rih0ra7jw48zpxrqwwrw1v0xay7h9727445wfbnrz6xwrcwbibv" + }, + "gtk": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "gtk" + }, + "branch": "main", + "revision": "0c3e8817da94769887c690b2211e006b287b27b1", + "url": "https://github.com/catppuccin/gtk/archive/0c3e8817da94769887c690b2211e006b287b27b1.tar.gz", + "hash": "0lssds5w78csb9hm22wilaglp9yj2bln7n1d57b2zmb05d3fj8kl" + }, + "helix": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "helix" + }, + "branch": "main", + "revision": "0164c4ca888084df4f511da22c6a0a664b5061d2", + "url": "https://github.com/catppuccin/helix/archive/0164c4ca888084df4f511da22c6a0a664b5061d2.tar.gz", + "hash": "1frrvsw3im3llq9l8vg2j7n3pg8a2gqvqd0cmymzpllnbhd9rpzi" + }, + "hyprland": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "hyprland" + }, + "branch": "main", + "revision": "b57375545f5da1f7790341905d1049b1873a8bb3", + "url": "https://github.com/catppuccin/hyprland/archive/b57375545f5da1f7790341905d1049b1873a8bb3.tar.gz", + "hash": "1vz0xbj26qb1vvzi18b5wrdla042vdyd3l4m98h7ay0fwydajfjx" + }, + "imv": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "imv" + }, + "branch": "main", + "revision": "0317a097b6ec8122b1da6d02f61d0c5158019f6e", + "url": "https://github.com/catppuccin/imv/archive/0317a097b6ec8122b1da6d02f61d0c5158019f6e.tar.gz", + "hash": "12df3lvsbss433m938fbm9snxv324s8z2j37jjfj6mb2rv21palz" + }, + "k9s": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "k9s" + }, + "branch": "main", + "revision": "82eba6feb442932e28facedfb18dfbe79234f180", + "url": "https://github.com/catppuccin/k9s/archive/82eba6feb442932e28facedfb18dfbe79234f180.tar.gz", + "hash": "1ndpmvga2sjgvsi449djw5pqx6b0ig3873p4gpxbm6b3lhdvpf2l" + }, + "kitty": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "kitty" + }, + "branch": "main", + "revision": "d7d61716a83cd135344cbb353af9d197c5d7cec1", + "url": "https://github.com/catppuccin/kitty/archive/d7d61716a83cd135344cbb353af9d197c5d7cec1.tar.gz", + "hash": "0cr244zwh46vgjw2i6j53f6n02gc48ry6s0xmna91f0zipxml4cr" + }, + "lazygit": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "lazygit" + }, + "branch": "main", + "revision": "30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6", + "url": "https://github.com/catppuccin/lazygit/archive/30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6.tar.gz", + "hash": "0hw0vv0k5m6vs51iridbiqmhza59j26wmrkydx1gfijfrbn40qws" + }, + "mako": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "mako" + }, + "branch": "main", + "revision": "9dd088aa5f4529a3dd4d9760415e340664cb86df", + "url": "https://github.com/catppuccin/mako/archive/9dd088aa5f4529a3dd4d9760415e340664cb86df.tar.gz", + "hash": "097x9jrkzvml6ngnhxwkzzl1l2awwv73yli1mhmpw83c0n8xck4x" + }, + "micro": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "micro" + }, + "branch": "main", + "revision": "ed8ef015f97c357575b5013e18042c9faa6c068a", + "url": "https://github.com/catppuccin/micro/archive/ed8ef015f97c357575b5013e18042c9faa6c068a.tar.gz", + "hash": "0vqhzd35gfv6r28mlyl9picrbfk8kmniyvsyf5b3cqnbjvxik77w" + }, + "mpv": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "mpv" + }, + "branch": "main", + "revision": "7fc6ed93dec891865d0b42be42ba9b4fb7d5a338", + "url": "https://github.com/catppuccin/mpv/archive/7fc6ed93dec891865d0b42be42ba9b4fb7d5a338.tar.gz", + "hash": "10h7xl9fxrakibi1f61ca9l1i528fnhbyqfz16k096yiklr2aa22" + }, + "nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "nvim" + }, + "branch": "main", + "revision": "d97387aea8264f484bb5d5e74f2182a06c83e0d8", + "url": "https://github.com/catppuccin/nvim/archive/d97387aea8264f484bb5d5e74f2182a06c83e0d8.tar.gz", + "hash": "1wybci6cjadjd5z0wkx2jmwb9ir72s4g4qrd9qsjl2qjfiaf26k9" + }, + "palette": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "palette" + }, + "branch": "main", + "revision": "408f081b6402d5d17b8324b75c6db5998100757d", + "url": "https://github.com/catppuccin/palette/archive/408f081b6402d5d17b8324b75c6db5998100757d.tar.gz", + "hash": "1fs2rfg6rwiijh5ahljvjhyh8g4y3wab5plky1k1a33dc9ph2717" + }, + "polybar": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "polybar" + }, + "branch": "main", + "revision": "989420b24e1f651b176c9d6083ad7c3b90a27f8b", + "url": "https://github.com/catppuccin/polybar/archive/989420b24e1f651b176c9d6083ad7c3b90a27f8b.tar.gz", + "hash": "0wvshs5f54h0nfzf7pjwdhmj6xcngxqqvaqzxa3w5j7sk89nmwyr" + }, + "rio": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "rio" + }, + "branch": "main", + "revision": "a8d3d3c61f828da5f3d6d02d7d489108f6428178", + "url": "https://github.com/catppuccin/rio/archive/a8d3d3c61f828da5f3d6d02d7d489108f6428178.tar.gz", + "hash": "02h9n85ll02bs6fk6ypnv9f7pwhglfwpvwhz8bq5s9h3q7vgqgkd" + }, + "rofi": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "rofi" + }, + "branch": "main", + "revision": "5350da41a11814f950c3354f090b90d4674a95ce", + "url": "https://github.com/catppuccin/rofi/archive/5350da41a11814f950c3354f090b90d4674a95ce.tar.gz", + "hash": "15phrl9qlbzjxmp29hak3a5k015x60w2hxjif90q82vp55zjpnhc" + }, + "skim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "skim" + }, + "branch": "main", + "revision": "d39304b5f84721788b19bc40aebcfd7720208d8a", + "url": "https://github.com/catppuccin/skim/archive/d39304b5f84721788b19bc40aebcfd7720208d8a.tar.gz", + "hash": "1b6cd1wfkprrn7imgf1w1f9a6iqy3bql2ansy7l0k44ps1gwrvxq" + }, + "starship": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "starship" + }, + "branch": "main", + "revision": "5629d2356f62a9f2f8efad3ff37476c19969bd4f", + "url": "https://github.com/catppuccin/starship/archive/5629d2356f62a9f2f8efad3ff37476c19969bd4f.tar.gz", + "hash": "1bdm1vzapbpnwjby51dys5ayijldq05mw4wf20r0jvaa072nxi4y" + }, + "sway": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "sway" + }, + "branch": "main", + "revision": "9c430d7010d73444af5272a596e3a2c058612f71", + "url": "https://github.com/catppuccin/sway/archive/9c430d7010d73444af5272a596e3a2c058612f71.tar.gz", + "hash": "0apai1ssmi97yi63sm0sig7plb45zvfv5p4p9qraq5pbhc7pyxhh" + }, + "swaylock": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "swaylock" + }, + "branch": "main", + "revision": "77246bbbbf8926bdb8962cffab6616bc2b9e8a06", + "url": "https://github.com/catppuccin/swaylock/archive/77246bbbbf8926bdb8962cffab6616bc2b9e8a06.tar.gz", + "hash": "02nql7ry71fxlhj0vsbsxi3jrmfajxmapr9gg0mzp0k0bxwqxa00" + }, + "tmux": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "tmux" + }, + "branch": "main", + "revision": "697087f593dae0163e01becf483b192894e69e33", + "url": "https://github.com/catppuccin/tmux/archive/697087f593dae0163e01becf483b192894e69e33.tar.gz", + "hash": "0fimahk7yw2r3w562nazh6yhi4p8531w28p7pfk9nvlrmrcsfy0h" + }, + "tofi": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "tofi" + }, + "branch": "main", + "revision": "2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb", + "url": "https://github.com/catppuccin/tofi/archive/2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb.tar.gz", + "hash": "1izqm6vf6n8d1ig1hvmgzwm2azrswz2g3k0i97d2fnxnzk324k2x" + }, + "waybar": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "waybar" + }, + "branch": "main", + "revision": "0830796af6aa64ce8bc7453d42876a628777ac68", + "url": "https://github.com/catppuccin/waybar/archive/0830796af6aa64ce8bc7453d42876a628777ac68.tar.gz", + "hash": "0np88b9zi6zk21fy5w4kmgjg1clqp4ggw1hijlv9qvlka2zkwmpn" + }, + "yazi": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "yazi" + }, + "branch": "main", + "revision": "0846aed69b2a62d29c98e100af0cf55ca729723d", + "url": "https://github.com/catppuccin/yazi/archive/0846aed69b2a62d29c98e100af0cf55ca729723d.tar.gz", + "hash": "1nb0l16v7v54g0pb1y1qwpflir1i8w9pjvszqv8fvyqycflkagnr" + }, + "zathura": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "zathura" + }, + "branch": "main", + "revision": "0adc53028d81bf047461bc61c43a484d11b15220", + "url": "https://github.com/catppuccin/zathura/archive/0adc53028d81bf047461bc61c43a484d11b15220.tar.gz", + "hash": "1cj1z2bh1qw1sbgqmk4i450yv7rgwcz06yhar23ccadsx22gzw7y" + }, + "zsh-syntax-highlighting": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "zsh-syntax-highlighting" + }, + "branch": "main", + "revision": "06d519c20798f0ebe275fc3a8101841faaeee8ea", + "url": "https://github.com/catppuccin/zsh-syntax-highlighting/archive/06d519c20798f0ebe275fc3a8101841faaeee8ea.tar.gz", + "hash": "1yj916klvzpvwghii7m6qx2ya3p2kx25nydymilvjzbx8z0sdcj3" + } + }, + "version": 3 +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0590ba4..9dd8c0d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,15 +7,14 @@ the `catppuccin.enable` and `catppuccin.flavour` options, and optionally the `catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively. -[nvfetcher](https://github.com/berberman/nvfetcher) is used to track our upstream +[npins](https://github.com/andir/npins) is used to track our upstream sources to use in modules. This allows us to easily access and auto-update all themes. -Most repositories can be specified like so: +You can add a new repository using a script in our subflake -```toml -[program_name] -src.git = "https://github.com/catppuccin/program_name.git" -fetch.github = "catppuccin/program_name" +```bash +nix run ./dev#add-source -- port_name branch_if_not_main ``` +Alternatively, you can run `npins add github --directory .sources` manually 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 diff --git a/_sources/generated.json b/_sources/generated.json deleted file mode 100644 index 08ba60ca..00000000 --- a/_sources/generated.json +++ /dev/null @@ -1,742 +0,0 @@ -{ - "alacritty": { - "cargoLocks": null, - "date": "2024-04-09", - "extract": null, - "name": "alacritty", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "alacritty", - "rev": "94800165c13998b600a9da9d29c330de9f28618e", - "sha256": "sha256-Pi1Hicv3wPALGgqurdTzXEzJNx7vVh+8B9tlqhRpR2Y=", - "type": "github" - }, - "version": "94800165c13998b600a9da9d29c330de9f28618e" - }, - "bat": { - "cargoLocks": null, - "date": "2024-04-25", - "extract": null, - "name": "bat", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "bat", - "rev": "d714cc1d358ea51bfc02550dabab693f70cccea0", - "sha256": "sha256-Q5B4NDrfCIK3UAMs94vdXnR42k4AXCqZz6sRn8bzmf4=", - "type": "github" - }, - "version": "d714cc1d358ea51bfc02550dabab693f70cccea0" - }, - "bottom": { - "cargoLocks": null, - "date": "2024-05-13", - "extract": null, - "name": "bottom", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "bottom", - "rev": "66c540ea512187df5f0c6c97312b0c6da7225af0", - "sha256": "sha256-Ge2avQXFWEqGPOglJBnH6bjejFGfCyLOqrYcaoAP0XI=", - "type": "github" - }, - "version": "66c540ea512187df5f0c6c97312b0c6da7225af0" - }, - "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" - }, - "cava": { - "cargoLocks": null, - "date": "2024-04-01", - "extract": null, - "name": "cava", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "cava", - "rev": "56c1e69318856a853b28e3ccce500c00099dc051", - "sha256": "sha256-FNNEYFurT6Y6rkKrvyAGt+3a+7GO4UE5el2sJ2ZKX2k=", - "type": "github" - }, - "version": "56c1e69318856a853b28e3ccce500c00099dc051" - }, - "delta": { - "cargoLocks": null, - "date": "2024-03-23", - "extract": null, - "name": "delta", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "delta", - "rev": "765eb17d0268bf07c20ca439771153f8bc79444f", - "sha256": "sha256-GA0n9obZlD0Y2rAbGMjcdJ5I0ij1NEPBFC7rv7J49QI=", - "type": "github" - }, - "version": "765eb17d0268bf07c20ca439771153f8bc79444f" - }, - "dunst": { - "cargoLocks": null, - "date": "2024-04-07", - "extract": null, - "name": "dunst", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "dunst", - "rev": "bfec91a5d0ab02a73a4615243feb5499d376831c", - "sha256": "sha256-xy99DpBrOKlP7DgKyPgbl4QGC+dnXnvkGlkIG0cmd2A=", - "type": "github" - }, - "version": "bfec91a5d0ab02a73a4615243feb5499d376831c" - }, - "fcitx5": { - "cargoLocks": null, - "date": "2022-10-05", - "extract": null, - "name": "fcitx5", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "fcitx5", - "rev": "ce244cfdf43a648d984719fdfd1d60aab09f5c97", - "sha256": "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=", - "type": "github" - }, - "version": "ce244cfdf43a648d984719fdfd1d60aab09f5c97" - }, - "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" - }, - "foot": { - "cargoLocks": null, - "date": "2024-05-02", - "extract": null, - "name": "foot", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "foot", - "rev": "307611230661b7b1787feb7f9d122e851bae97e9", - "sha256": "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4=", - "type": "github" - }, - "version": "307611230661b7b1787feb7f9d122e851bae97e9" - }, - "gh-dash": { - "cargoLocks": null, - "date": "2024-04-27", - "extract": null, - "name": "gh-dash", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "gh-dash", - "rev": "a971447dbb6e43c274ce52697c0bd381735c3c8a", - "sha256": "sha256-zbFOjg097LN+FRsagnYOdfaDb0tGNJPYkoxTbYK/4HA=", - "type": "github" - }, - "version": "a971447dbb6e43c274ce52697c0bd381735c3c8a" - }, - "gitui": { - "cargoLocks": null, - "date": "2023-11-13", - "extract": null, - "name": "gitui", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "gitui", - "rev": "39978362b2c88b636cacd55b65d2f05c45a47eb9", - "sha256": "sha256-kWaHQ1+uoasT8zXxOxkur+QgZu1wLsOOrP/TL+6cfII=", - "type": "github" - }, - "version": "39978362b2c88b636cacd55b65d2f05c45a47eb9" - }, - "glamour": { - "cargoLocks": null, - "date": "2024-04-02", - "extract": null, - "name": "glamour", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "glamour", - "rev": "66d7b09325af67b1c5cdb063343e829c04ad7d5f", - "sha256": "sha256-f3JFgqL3K/u8U/UzmBohJLDBPlT446bosRQDca9+4oA=", - "type": "github" - }, - "version": "66d7b09325af67b1c5cdb063343e829c04ad7d5f" - }, - "grub": { - "cargoLocks": null, - "date": "2024-03-07", - "extract": null, - "name": "grub", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "grub", - "rev": "88f6124757331fd3a37c8a69473021389b7663ad", - "sha256": "sha256-e8XFWebd/GyX44WQI06Cx6sOduCZc5z7/YhweVQGMGY=", - "type": "github" - }, - "version": "88f6124757331fd3a37c8a69473021389b7663ad" - }, - "helix": { - "cargoLocks": null, - "date": "2024-03-30", - "extract": null, - "name": "helix", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "helix", - "rev": "0164c4ca888084df4f511da22c6a0a664b5061d2", - "sha256": "sha256-8d+cGlyW0vurrww0vPETCr077JHibUQTpnTUOLjeObs=", - "type": "github" - }, - "version": "0164c4ca888084df4f511da22c6a0a664b5061d2" - }, - "hyprland": { - "cargoLocks": null, - "date": "2024-04-03", - "extract": null, - "name": "hyprland", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "hyprland", - "rev": "b57375545f5da1f7790341905d1049b1873a8bb3", - "sha256": "sha256-XTqpmucOeHUgSpXQ0XzbggBFW+ZloRD/3mFhI+Tq4O8=", - "type": "github" - }, - "version": "b57375545f5da1f7790341905d1049b1873a8bb3" - }, - "imv": { - "cargoLocks": null, - "date": "2024-01-17", - "extract": null, - "name": "imv", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "imv", - "rev": "0317a097b6ec8122b1da6d02f61d0c5158019f6e", - "sha256": "sha256-n6obxM5iVSOdlGdI8ZEmYuxudarLoZHqGETrpTcdrok=", - "type": "github" - }, - "version": "0317a097b6ec8122b1da6d02f61d0c5158019f6e" - }, - "k9s": { - "cargoLocks": null, - "date": "2024-03-22", - "extract": null, - "name": "k9s", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "k9s", - "rev": "82eba6feb442932e28facedfb18dfbe79234f180", - "sha256": "sha256-VLi7G6Rjmbr6feSOg8aLYJmOb+GyJUKi3k9qod6ut9k=", - "type": "github" - }, - "version": "82eba6feb442932e28facedfb18dfbe79234f180" - }, - "kitty": { - "cargoLocks": null, - "date": "2024-01-10", - "extract": null, - "name": "kitty", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "kitty", - "rev": "d7d61716a83cd135344cbb353af9d197c5d7cec1", - "sha256": "sha256-mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=", - "type": "github" - }, - "version": "d7d61716a83cd135344cbb353af9d197c5d7cec1" - }, - "lazygit": { - "cargoLocks": null, - "date": "2024-03-31", - "extract": null, - "name": "lazygit", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "lazygit", - "rev": "30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6", - "sha256": "sha256-mmNA7MpORvdCb37myo2QqagPK46rxRxD0dvUMsHegEM=", - "type": "github" - }, - "version": "30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6" - }, - "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" - }, - "mpv": { - "cargoLocks": null, - "date": "2024-05-05", - "extract": null, - "name": "mpv", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "mpv", - "rev": "7fc6ed93dec891865d0b42be42ba9b4fb7d5a338", - "sha256": "sha256-QiglMp3RmwSmCd9hv6B1SJQYaFIsGBfiilPl7hLtB4I=", - "type": "github" - }, - "version": "7fc6ed93dec891865d0b42be42ba9b4fb7d5a338" - }, - "neovim": { - "cargoLocks": null, - "date": "2024-05-08", - "extract": null, - "name": "neovim", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "nvim", - "rev": "d97387aea8264f484bb5d5e74f2182a06c83e0d8", - "sha256": "sha256-aRrhVHQSCyo1Ti1j8ogWJ8e0eJWiTw5+abIpyUxky/M=", - "type": "github" - }, - "version": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" - }, - "palette": { - "cargoLocks": null, - "date": "2024-03-25", - "extract": null, - "name": "palette", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "palette", - "rev": "408f081b6402d5d17b8324b75c6db5998100757d", - "sha256": "sha256-JxwBb2JtDBVm8JPeshQfnjwEPZRbUqgKlDHybJ7LQrs=", - "type": "github" - }, - "version": "408f081b6402d5d17b8324b75c6db5998100757d" - }, - "polybar": { - "cargoLocks": null, - "date": "2024-02-03", - "extract": null, - "name": "polybar", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "polybar", - "rev": "989420b24e1f651b176c9d6083ad7c3b90a27f8b", - "sha256": "sha256-2fNqE5r6yMKH6h+rjXF/lnUjK2xc3uO+swCS4oqGenM=", - "type": "github" - }, - "version": "989420b24e1f651b176c9d6083ad7c3b90a27f8b" - }, - "rio": { - "cargoLocks": null, - "date": "2023-12-05", - "extract": null, - "name": "rio", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "rio", - "rev": "a8d3d3c61f828da5f3d6d02d7d489108f6428178", - "sha256": "sha256-bT789sEDJl3wQh/yfbmjD/J7XNr2ejOd0UsASguyCQo=", - "type": "github" - }, - "version": "a8d3d3c61f828da5f3d6d02d7d489108f6428178" - }, - "rofi": { - "cargoLocks": null, - "date": "2022-12-31", - "extract": null, - "name": "rofi", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "rofi", - "rev": "5350da41a11814f950c3354f090b90d4674a95ce", - "sha256": "sha256-DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=", - "type": "github" - }, - "version": "5350da41a11814f950c3354f090b90d4674a95ce" - }, - "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": "2024-04-03", - "extract": null, - "name": "sway", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "sway", - "rev": "9c430d7010d73444af5272a596e3a2c058612f71", - "sha256": "sha256-EHZ/D4PrFqwyTpfcst3+hSx6z4saVD1M9CfFqnWI6io=", - "type": "github" - }, - "version": "9c430d7010d73444af5272a596e3a2c058612f71" - }, - "swaylock": { - "cargoLocks": null, - "date": "2024-04-01", - "extract": null, - "name": "swaylock", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "swaylock", - "rev": "77246bbbbf8926bdb8962cffab6616bc2b9e8a06", - "sha256": "sha256-AKiOeV9ggvsreC/lq2qXytUsR+x66Q0kpN2F4/Oh2Ao=", - "type": "github" - }, - "version": "77246bbbbf8926bdb8962cffab6616bc2b9e8a06" - }, - "tmux": { - "cargoLocks": null, - "date": "2024-05-12", - "extract": null, - "name": "tmux", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "tmux", - "rev": "697087f593dae0163e01becf483b192894e69e33", - "sha256": "sha256-EHinWa6Zbpumu+ciwcMo6JIIvYFfWWEKH1lwfyZUNTo=", - "type": "github" - }, - "version": "697087f593dae0163e01becf483b192894e69e33" - }, - "tofi": { - "cargoLocks": null, - "date": "2023-09-30", - "extract": null, - "name": "tofi", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "tofi", - "rev": "2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb", - "sha256": "sha256-XUwixvy2WyfaSRHM8cTnOn8lKv+vbhheDA1Z47ap+Mc=", - "type": "github" - }, - "version": "2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb" - }, - "waybar": { - "cargoLocks": null, - "date": "2024-03-31", - "extract": null, - "name": "waybar", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "waybar", - "rev": "0830796af6aa64ce8bc7453d42876a628777ac68", - "sha256": "sha256-9lY+v1CTbpw2lREG/h65mLLw5KuT8OJdEPOb+NNC6Fo=", - "type": "github" - }, - "version": "0830796af6aa64ce8bc7453d42876a628777ac68" - }, - "yazi": { - "cargoLocks": null, - "date": "2024-02-21", - "extract": null, - "name": "yazi", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "yazi", - "rev": "0846aed69b2a62d29c98e100af0cf55ca729723d", - "sha256": "sha256-2T41qWMe++3Qxl9veRNHMeRI3eU4+LAueKTss02gYNk=", - "type": "github" - }, - "version": "0846aed69b2a62d29c98e100af0cf55ca729723d" - }, - "zathura": { - "cargoLocks": null, - "date": "2024-04-04", - "extract": null, - "name": "zathura", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "zathura", - "rev": "0adc53028d81bf047461bc61c43a484d11b15220", - "sha256": "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI=", - "type": "github" - }, - "version": "0adc53028d81bf047461bc61c43a484d11b15220" - }, - "zsh-syntax-highlighting": { - "cargoLocks": null, - "date": "2022-10-12", - "extract": null, - "name": "zsh-syntax-highlighting", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "catppuccin", - "repo": "zsh-syntax-highlighting", - "rev": "06d519c20798f0ebe275fc3a8101841faaeee8ea", - "sha256": "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=", - "type": "github" - }, - "version": "06d519c20798f0ebe275fc3a8101841faaeee8ea" - } -} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix deleted file mode 100644 index b9174f6c..00000000 --- a/_sources/generated.nix +++ /dev/null @@ -1,448 +0,0 @@ -# This file was generated by nvfetcher, please do not modify it manually. -{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: -{ - alacritty = { - pname = "alacritty"; - version = "94800165c13998b600a9da9d29c330de9f28618e"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "alacritty"; - rev = "94800165c13998b600a9da9d29c330de9f28618e"; - fetchSubmodules = false; - sha256 = "sha256-Pi1Hicv3wPALGgqurdTzXEzJNx7vVh+8B9tlqhRpR2Y="; - }; - date = "2024-04-09"; - }; - bat = { - pname = "bat"; - version = "d714cc1d358ea51bfc02550dabab693f70cccea0"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "bat"; - rev = "d714cc1d358ea51bfc02550dabab693f70cccea0"; - fetchSubmodules = false; - sha256 = "sha256-Q5B4NDrfCIK3UAMs94vdXnR42k4AXCqZz6sRn8bzmf4="; - }; - date = "2024-04-25"; - }; - bottom = { - pname = "bottom"; - version = "66c540ea512187df5f0c6c97312b0c6da7225af0"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "bottom"; - rev = "66c540ea512187df5f0c6c97312b0c6da7225af0"; - fetchSubmodules = false; - sha256 = "sha256-Ge2avQXFWEqGPOglJBnH6bjejFGfCyLOqrYcaoAP0XI="; - }; - date = "2024-05-13"; - }; - btop = { - pname = "btop"; - version = "c6469190f2ecf25f017d6120bf4e050e6b1d17af"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "btop"; - rev = "c6469190f2ecf25f017d6120bf4e050e6b1d17af"; - fetchSubmodules = false; - sha256 = "sha256-jodJl4f2T9ViNqsY9fk8IV62CrpC5hy7WK3aRpu70Cs="; - }; - date = "2023-10-07"; - }; - cava = { - pname = "cava"; - version = "56c1e69318856a853b28e3ccce500c00099dc051"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "cava"; - rev = "56c1e69318856a853b28e3ccce500c00099dc051"; - fetchSubmodules = false; - sha256 = "sha256-FNNEYFurT6Y6rkKrvyAGt+3a+7GO4UE5el2sJ2ZKX2k="; - }; - date = "2024-04-01"; - }; - delta = { - pname = "delta"; - version = "765eb17d0268bf07c20ca439771153f8bc79444f"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "delta"; - rev = "765eb17d0268bf07c20ca439771153f8bc79444f"; - fetchSubmodules = false; - sha256 = "sha256-GA0n9obZlD0Y2rAbGMjcdJ5I0ij1NEPBFC7rv7J49QI="; - }; - date = "2024-03-23"; - }; - dunst = { - pname = "dunst"; - version = "bfec91a5d0ab02a73a4615243feb5499d376831c"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "dunst"; - rev = "bfec91a5d0ab02a73a4615243feb5499d376831c"; - fetchSubmodules = false; - sha256 = "sha256-xy99DpBrOKlP7DgKyPgbl4QGC+dnXnvkGlkIG0cmd2A="; - }; - date = "2024-04-07"; - }; - fcitx5 = { - pname = "fcitx5"; - version = "ce244cfdf43a648d984719fdfd1d60aab09f5c97"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "fcitx5"; - rev = "ce244cfdf43a648d984719fdfd1d60aab09f5c97"; - fetchSubmodules = false; - sha256 = "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps="; - }; - date = "2022-10-05"; - }; - fish = { - pname = "fish"; - version = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "fish"; - rev = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e"; - fetchSubmodules = false; - sha256 = "sha256-Dc/zdxfzAUM5NX8PxzfljRbYvO9f9syuLO8yBr+R3qg="; - }; - date = "2023-11-02"; - }; - foot = { - pname = "foot"; - version = "307611230661b7b1787feb7f9d122e851bae97e9"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "foot"; - rev = "307611230661b7b1787feb7f9d122e851bae97e9"; - fetchSubmodules = false; - sha256 = "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4="; - }; - date = "2024-05-02"; - }; - gh-dash = { - pname = "gh-dash"; - version = "a971447dbb6e43c274ce52697c0bd381735c3c8a"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "gh-dash"; - rev = "a971447dbb6e43c274ce52697c0bd381735c3c8a"; - fetchSubmodules = false; - sha256 = "sha256-zbFOjg097LN+FRsagnYOdfaDb0tGNJPYkoxTbYK/4HA="; - }; - date = "2024-04-27"; - }; - gitui = { - pname = "gitui"; - version = "39978362b2c88b636cacd55b65d2f05c45a47eb9"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "gitui"; - rev = "39978362b2c88b636cacd55b65d2f05c45a47eb9"; - fetchSubmodules = false; - sha256 = "sha256-kWaHQ1+uoasT8zXxOxkur+QgZu1wLsOOrP/TL+6cfII="; - }; - date = "2023-11-13"; - }; - glamour = { - pname = "glamour"; - version = "66d7b09325af67b1c5cdb063343e829c04ad7d5f"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "glamour"; - rev = "66d7b09325af67b1c5cdb063343e829c04ad7d5f"; - fetchSubmodules = false; - sha256 = "sha256-f3JFgqL3K/u8U/UzmBohJLDBPlT446bosRQDca9+4oA="; - }; - date = "2024-04-02"; - }; - grub = { - pname = "grub"; - version = "88f6124757331fd3a37c8a69473021389b7663ad"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "grub"; - rev = "88f6124757331fd3a37c8a69473021389b7663ad"; - fetchSubmodules = false; - sha256 = "sha256-e8XFWebd/GyX44WQI06Cx6sOduCZc5z7/YhweVQGMGY="; - }; - date = "2024-03-07"; - }; - helix = { - pname = "helix"; - version = "0164c4ca888084df4f511da22c6a0a664b5061d2"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "helix"; - rev = "0164c4ca888084df4f511da22c6a0a664b5061d2"; - fetchSubmodules = false; - sha256 = "sha256-8d+cGlyW0vurrww0vPETCr077JHibUQTpnTUOLjeObs="; - }; - date = "2024-03-30"; - }; - hyprland = { - pname = "hyprland"; - version = "b57375545f5da1f7790341905d1049b1873a8bb3"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "hyprland"; - rev = "b57375545f5da1f7790341905d1049b1873a8bb3"; - fetchSubmodules = false; - sha256 = "sha256-XTqpmucOeHUgSpXQ0XzbggBFW+ZloRD/3mFhI+Tq4O8="; - }; - date = "2024-04-03"; - }; - imv = { - pname = "imv"; - version = "0317a097b6ec8122b1da6d02f61d0c5158019f6e"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "imv"; - rev = "0317a097b6ec8122b1da6d02f61d0c5158019f6e"; - fetchSubmodules = false; - sha256 = "sha256-n6obxM5iVSOdlGdI8ZEmYuxudarLoZHqGETrpTcdrok="; - }; - date = "2024-01-17"; - }; - k9s = { - pname = "k9s"; - version = "82eba6feb442932e28facedfb18dfbe79234f180"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "k9s"; - rev = "82eba6feb442932e28facedfb18dfbe79234f180"; - fetchSubmodules = false; - sha256 = "sha256-VLi7G6Rjmbr6feSOg8aLYJmOb+GyJUKi3k9qod6ut9k="; - }; - date = "2024-03-22"; - }; - kitty = { - pname = "kitty"; - version = "d7d61716a83cd135344cbb353af9d197c5d7cec1"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "kitty"; - rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1"; - fetchSubmodules = false; - sha256 = "sha256-mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM="; - }; - date = "2024-01-10"; - }; - lazygit = { - pname = "lazygit"; - version = "30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "lazygit"; - rev = "30bff2e6d14ca12a09d71e5ce4e6a086b3e48aa6"; - fetchSubmodules = false; - sha256 = "sha256-mmNA7MpORvdCb37myo2QqagPK46rxRxD0dvUMsHegEM="; - }; - date = "2024-03-31"; - }; - 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"; - }; - mpv = { - pname = "mpv"; - version = "7fc6ed93dec891865d0b42be42ba9b4fb7d5a338"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "mpv"; - rev = "7fc6ed93dec891865d0b42be42ba9b4fb7d5a338"; - fetchSubmodules = false; - sha256 = "sha256-QiglMp3RmwSmCd9hv6B1SJQYaFIsGBfiilPl7hLtB4I="; - }; - date = "2024-05-05"; - }; - neovim = { - pname = "neovim"; - version = "d97387aea8264f484bb5d5e74f2182a06c83e0d8"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "nvim"; - rev = "d97387aea8264f484bb5d5e74f2182a06c83e0d8"; - fetchSubmodules = false; - sha256 = "sha256-aRrhVHQSCyo1Ti1j8ogWJ8e0eJWiTw5+abIpyUxky/M="; - }; - date = "2024-05-08"; - }; - palette = { - pname = "palette"; - version = "408f081b6402d5d17b8324b75c6db5998100757d"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "palette"; - rev = "408f081b6402d5d17b8324b75c6db5998100757d"; - fetchSubmodules = false; - sha256 = "sha256-JxwBb2JtDBVm8JPeshQfnjwEPZRbUqgKlDHybJ7LQrs="; - }; - date = "2024-03-25"; - }; - polybar = { - pname = "polybar"; - version = "989420b24e1f651b176c9d6083ad7c3b90a27f8b"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "polybar"; - rev = "989420b24e1f651b176c9d6083ad7c3b90a27f8b"; - fetchSubmodules = false; - sha256 = "sha256-2fNqE5r6yMKH6h+rjXF/lnUjK2xc3uO+swCS4oqGenM="; - }; - date = "2024-02-03"; - }; - rio = { - pname = "rio"; - version = "a8d3d3c61f828da5f3d6d02d7d489108f6428178"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "rio"; - rev = "a8d3d3c61f828da5f3d6d02d7d489108f6428178"; - fetchSubmodules = false; - sha256 = "sha256-bT789sEDJl3wQh/yfbmjD/J7XNr2ejOd0UsASguyCQo="; - }; - date = "2023-12-05"; - }; - rofi = { - pname = "rofi"; - version = "5350da41a11814f950c3354f090b90d4674a95ce"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "rofi"; - rev = "5350da41a11814f950c3354f090b90d4674a95ce"; - fetchSubmodules = false; - sha256 = "sha256-DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY="; - }; - date = "2022-12-31"; - }; - 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 = "9c430d7010d73444af5272a596e3a2c058612f71"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "sway"; - rev = "9c430d7010d73444af5272a596e3a2c058612f71"; - fetchSubmodules = false; - sha256 = "sha256-EHZ/D4PrFqwyTpfcst3+hSx6z4saVD1M9CfFqnWI6io="; - }; - date = "2024-04-03"; - }; - swaylock = { - pname = "swaylock"; - version = "77246bbbbf8926bdb8962cffab6616bc2b9e8a06"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "swaylock"; - rev = "77246bbbbf8926bdb8962cffab6616bc2b9e8a06"; - fetchSubmodules = false; - sha256 = "sha256-AKiOeV9ggvsreC/lq2qXytUsR+x66Q0kpN2F4/Oh2Ao="; - }; - date = "2024-04-01"; - }; - tmux = { - pname = "tmux"; - version = "697087f593dae0163e01becf483b192894e69e33"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "tmux"; - rev = "697087f593dae0163e01becf483b192894e69e33"; - fetchSubmodules = false; - sha256 = "sha256-EHinWa6Zbpumu+ciwcMo6JIIvYFfWWEKH1lwfyZUNTo="; - }; - date = "2024-05-12"; - }; - tofi = { - pname = "tofi"; - version = "2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "tofi"; - rev = "2e74ddba0c582b2ca2d9d06f67f5a902c3a093fb"; - fetchSubmodules = false; - sha256 = "sha256-XUwixvy2WyfaSRHM8cTnOn8lKv+vbhheDA1Z47ap+Mc="; - }; - date = "2023-09-30"; - }; - waybar = { - pname = "waybar"; - version = "0830796af6aa64ce8bc7453d42876a628777ac68"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "waybar"; - rev = "0830796af6aa64ce8bc7453d42876a628777ac68"; - fetchSubmodules = false; - sha256 = "sha256-9lY+v1CTbpw2lREG/h65mLLw5KuT8OJdEPOb+NNC6Fo="; - }; - date = "2024-03-31"; - }; - yazi = { - pname = "yazi"; - version = "0846aed69b2a62d29c98e100af0cf55ca729723d"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "yazi"; - rev = "0846aed69b2a62d29c98e100af0cf55ca729723d"; - fetchSubmodules = false; - sha256 = "sha256-2T41qWMe++3Qxl9veRNHMeRI3eU4+LAueKTss02gYNk="; - }; - date = "2024-02-21"; - }; - zathura = { - pname = "zathura"; - version = "0adc53028d81bf047461bc61c43a484d11b15220"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "zathura"; - rev = "0adc53028d81bf047461bc61c43a484d11b15220"; - fetchSubmodules = false; - sha256 = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; - }; - date = "2024-04-04"; - }; - zsh-syntax-highlighting = { - pname = "zsh-syntax-highlighting"; - version = "06d519c20798f0ebe275fc3a8101841faaeee8ea"; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "zsh-syntax-highlighting"; - rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea"; - fetchSubmodules = false; - sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo="; - }; - date = "2022-10-12"; - }; -} diff --git a/dev/add_source.sh b/dev/add_source.sh new file mode 100644 index 00000000..7c0bee0a --- /dev/null +++ b/dev/add_source.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e + +_usage=" +Usage: add-source [branch] +repo_name: Name of the repository in the Catppuccin org (required) +branch: Primary branch of the repository (optional, defaults to main) +" + +repo_name="${1}" +branch_name="${2:-main}" + +if [ "${repo_name:-}" = "" ]; then + echo "error: a repository name is required!" >&2 + echo "$_usage" + exit 1 +fi + +npins add github \ + catppuccin "$repo_name" \ + --directory ./.sources \ + --branch "$branch_name" diff --git a/dev/flake.nix b/dev/flake.nix index b6c1346c..c45bc19f 100644 --- a/dev/flake.nix +++ b/dev/flake.nix @@ -22,6 +22,24 @@ forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system}); in { + apps = forAllSystems ({ lib, pkgs, ... }: { + add-source = { + type = "app"; + program = lib.getExe ( + pkgs.runCommand "add-source" + { + nativeBuildInputs = [ pkgs.makeWrapper ]; + meta.mainProgram = "add-source"; + } '' + mkdir -p $out/bin + install -Dm755 ${./add_source.sh} $out/bin/add-source + wrapProgram $out/bin/add-source \ + --prefix PATH : ${ lib.makeBinPath [ pkgs.npins ]} + '' + ); + }; + }); + checks = forAllSystems ({ lib, pkgs, ... }: lib.optionalAttrs pkgs.stdenv.isLinux { module-vm-test = pkgs.callPackage ../test.nix { inherit home-manager; }; }); diff --git a/modules/home-manager/alacritty.nix b/modules/home-manager/alacritty.nix index 34c41d2f..1ecef9dc 100644 --- a/modules/home-manager/alacritty.nix +++ b/modules/home-manager/alacritty.nix @@ -1,10 +1,10 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; cfg = config.programs.alacritty.catppuccin; enable = cfg.enable && config.programs.alacritty.enable; in diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index e45e803f..b583c673 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.bat.catppuccin; enable = cfg.enable && config.programs.bat.enable; themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}"; diff --git a/modules/home-manager/bottom.nix b/modules/home-manager/bottom.nix index dbe990a5..0f94aad2 100644 --- a/modules/home-manager/bottom.nix +++ b/modules/home-manager/bottom.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.bottom.catppuccin; enable = cfg.enable && config.programs.bottom.enable; in diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix index 43aabe27..d034ffd3 100644 --- a/modules/home-manager/btop.nix +++ b/modules/home-manager/btop.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.btop.catppuccin; enable = cfg.enable && config.programs.btop.enable; diff --git a/modules/home-manager/cava.nix b/modules/home-manager/cava.nix index 0a282f65..32a2d779 100644 --- a/modules/home-manager/cava.nix +++ b/modules/home-manager/cava.nix @@ -1,10 +1,11 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.programs.cava.catppuccin; enable = cfg.enable && config.programs.cava.enable; in diff --git a/modules/home-manager/delta.nix b/modules/home-manager/delta.nix index 163235fe..0119b055 100644 --- a/modules/home-manager/delta.nix +++ b/modules/home-manager/delta.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.git.delta.catppuccin; enable = cfg.enable && config.programs.git.delta.enable; in diff --git a/modules/home-manager/dunst.nix b/modules/home-manager/dunst.nix index c82ddaae..ba28dda1 100644 --- a/modules/home-manager/dunst.nix +++ b/modules/home-manager/dunst.nix @@ -1,10 +1,10 @@ { config , lib -, sources , ... }: let - inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.services.dunst.catppuccin; enable = cfg.enable && config.services.dunst.enable; in diff --git a/modules/home-manager/fcitx5.nix b/modules/home-manager/fcitx5.nix index 6bd113a8..7fcf95dc 100644 --- a/modules/home-manager/fcitx5.nix +++ b/modules/home-manager/fcitx5.nix @@ -1,10 +1,11 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.i18n.inputMethod.fcitx5.catppuccin; enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5"; in diff --git a/modules/home-manager/fish.nix b/modules/home-manager/fish.nix index 1124f0ac..52187acd 100644 --- a/modules/home-manager/fish.nix +++ b/modules/home-manager/fish.nix @@ -1,10 +1,10 @@ { config , lib -, sources , ... }: let inherit (lib) ctp mkIf; + inherit (config.catppuccin) sources; cfg = config.programs.fish.catppuccin; enable = cfg.enable && config.programs.fish.enable; diff --git a/modules/home-manager/foot.nix b/modules/home-manager/foot.nix index ca1ce0a4..444056a3 100644 --- a/modules/home-manager/foot.nix +++ b/modules/home-manager/foot.nix @@ -1,9 +1,10 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; + cfg = config.programs.foot.catppuccin; enable = cfg.enable && config.programs.foot.enable; theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavour}.ini"); diff --git a/modules/home-manager/fzf.nix b/modules/home-manager/fzf.nix index f61fd638..9e03c83f 100644 --- a/modules/home-manager/fzf.nix +++ b/modules/home-manager/fzf.nix @@ -1,9 +1,10 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; + cfg = config.programs.fzf.catppuccin; enable = cfg.enable && config.programs.fzf.enable; palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; diff --git a/modules/home-manager/gh-dash.nix b/modules/home-manager/gh-dash.nix index 3fcd1e33..dedc4210 100644 --- a/modules/home-manager/gh-dash.nix +++ b/modules/home-manager/gh-dash.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.gh-dash.catppuccin; enable = cfg.enable && config.programs.gh-dash.enable; theme = "${sources.gh-dash}/themes/${cfg.flavour}/catppuccin-${cfg.flavour}-${cfg.accent}.yml"; diff --git a/modules/home-manager/gitui.nix b/modules/home-manager/gitui.nix index 29fc5c44..018f4404 100644 --- a/modules/home-manager/gitui.nix +++ b/modules/home-manager/gitui.nix @@ -1,9 +1,10 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; + cfg = config.programs.gitui.catppuccin; enable = cfg.enable && config.programs.gitui.enable; in diff --git a/modules/home-manager/glamour.nix b/modules/home-manager/glamour.nix index 11b0fbbe..118a0001 100644 --- a/modules/home-manager/glamour.nix +++ b/modules/home-manager/glamour.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.glamour.catppuccin; inherit (cfg) enable; in diff --git a/modules/home-manager/globals.nix b/modules/home-manager/globals.nix index 213ccc15..1c9b1f8e 100644 --- a/modules/home-manager/globals.nix +++ b/modules/home-manager/globals.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{ lib, defaultSources, ... }: { options.catppuccin = { enable = lib.mkEnableOption "Catppuccin globally"; @@ -13,5 +13,14 @@ default = "mauve"; description = "Global Catppuccin accent"; }; + + sources = lib.mkOption { + type = lib.types.lazyAttrsOf lib.types.raw; + default = defaultSources; + # HACK! + # without this, overriding one source will delete all others. -@getchoo + apply = lib.recursiveUpdate defaultSources; + description = "Port sources used across all options"; + }; }; } diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index e01caf0b..bbba7316 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.helix.catppuccin; enable = cfg.enable && config.programs.helix.enable; in diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 8909efa6..eddad4a1 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.wayland.windowManager.hyprland.catppuccin; enable = cfg.enable && config.wayland.windowManager.hyprland.enable; in diff --git a/modules/home-manager/imv.nix b/modules/home-manager/imv.nix index 88bab81c..9ecc9b5b 100644 --- a/modules/home-manager/imv.nix +++ b/modules/home-manager/imv.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.imv.catppuccin; enable = cfg.enable && config.programs.imv.enable; in diff --git a/modules/home-manager/k9s.nix b/modules/home-manager/k9s.nix index 1c8bf030..3f1080e9 100644 --- a/modules/home-manager/k9s.nix +++ b/modules/home-manager/k9s.nix @@ -1,9 +1,10 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; + cfg = config.programs.k9s.catppuccin; enable = cfg.enable && config.programs.k9s.enable; diff --git a/modules/home-manager/lazygit.nix b/modules/home-manager/lazygit.nix index 754d047b..004578b8 100644 --- a/modules/home-manager/lazygit.nix +++ b/modules/home-manager/lazygit.nix @@ -1,10 +1,10 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; cfg = config.programs.lazygit.catppuccin; enable = cfg.enable && config.programs.lazygit.enable; diff --git a/modules/home-manager/mako.nix b/modules/home-manager/mako.nix index e31c3ff4..9b1a7e99 100644 --- a/modules/home-manager/mako.nix +++ b/modules/home-manager/mako.nix @@ -1,12 +1,10 @@ { config , pkgs , lib -, sources , ... }: let - inherit (builtins) readFile; - + inherit (config.catppuccin) sources; cfg = config.services.mako.catppuccin; enable = cfg.enable && config.services.mako.enable; theme = lib.ctp.fromINI (sources.mako + /src/${cfg.flavour}); @@ -24,6 +22,6 @@ in textColor = theme.text-color; borderColor = theme.border-color; progressColor = theme.progress-color; - extraConfig = readFile ((pkgs.formats.ini { }).generate "mako-extra-config" extraConfigAttrs); + extraConfig = builtins.readFile ((pkgs.formats.ini { }).generate "mako-extra-config" extraConfigAttrs); }; } diff --git a/modules/home-manager/micro.nix b/modules/home-manager/micro.nix index 90da8068..9d20bd5d 100644 --- a/modules/home-manager/micro.nix +++ b/modules/home-manager/micro.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.micro.catppuccin; enable = cfg.enable && config.programs.micro.enable; diff --git a/modules/home-manager/mpv.nix b/modules/home-manager/mpv.nix index a02fc646..1ebb7a14 100644 --- a/modules/home-manager/mpv.nix +++ b/modules/home-manager/mpv.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.mpv.catppuccin; enable = cfg.enable && config.programs.mpv.enable; themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent}; diff --git a/modules/home-manager/polybar.nix b/modules/home-manager/polybar.nix index 38d00ee4..0c42c52f 100644 --- a/modules/home-manager/polybar.nix +++ b/modules/home-manager/polybar.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.services.polybar.catppuccin; enable = cfg.enable && config.services.polybar.enable; in diff --git a/modules/home-manager/rio.nix b/modules/home-manager/rio.nix index bf5f650b..a090353e 100644 --- a/modules/home-manager/rio.nix +++ b/modules/home-manager/rio.nix @@ -1,10 +1,11 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.programs.rio.catppuccin; enable = cfg.enable && config.programs.rio.enable; in diff --git a/modules/home-manager/rofi.nix b/modules/home-manager/rofi.nix index ffeff2c1..5afd12af 100644 --- a/modules/home-manager/rofi.nix +++ b/modules/home-manager/rofi.nix @@ -1,10 +1,10 @@ { config , lib -, sources , ... }: let - inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.programs.rofi.catppuccin; enable = cfg.enable && config.programs.rofi.enable; in diff --git a/modules/home-manager/skim.nix b/modules/home-manager/skim.nix index 87d88895..5690dde5 100644 --- a/modules/home-manager/skim.nix +++ b/modules/home-manager/skim.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.skim.catppuccin; enable = cfg.enable && config.programs.skim.enable; palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; diff --git a/modules/home-manager/starship.nix b/modules/home-manager/starship.nix index cbf2b526..12e7af1a 100644 --- a/modules/home-manager/starship.nix +++ b/modules/home-manager/starship.nix @@ -1,10 +1,9 @@ { config , lib -, sources , ... }: let - inherit (builtins) fromTOML readFile; + inherit (config.catppuccin) sources; cfg = config.programs.starship.catppuccin; enable = cfg.enable && config.programs.starship.enable; in @@ -18,5 +17,5 @@ in format = lib.mkDefault "$all"; palette = "catppuccin_${cfg.flavour}"; } - // fromTOML (readFile "${sources.starship}/palettes/${cfg.flavour}.toml")); + // builtins.fromTOML (builtins.readFile "${sources.starship}/palettes/${cfg.flavour}.toml")); } diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index 628f476e..d1b011e0 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.wayland.windowManager.sway.catppuccin; enable = cfg.enable && config.wayland.windowManager.sway.enable; theme = "${sources.sway}/themes/catppuccin-${cfg.flavour}"; diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix index 9fceec9c..e0bcc5b8 100644 --- a/modules/home-manager/swaylock.nix +++ b/modules/home-manager/swaylock.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.swaylock.catppuccin; enable = cfg.enable && config.programs.swaylock.enable; in diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix index f960fc23..f27261cc 100644 --- a/modules/home-manager/tmux.nix +++ b/modules/home-manager/tmux.nix @@ -1,11 +1,11 @@ { config , lib , pkgs -, sources , ... }: let inherit (lib) ctp mkOption types concatStrings; + inherit (config.catppuccin) sources; cfg = config.programs.tmux.catppuccin; enable = cfg.enable && config.programs.tmux.enable; @@ -13,7 +13,7 @@ let # TODO @getchoo: upstream this in nixpkgs pkgs.tmuxPlugins.mkTmuxPlugin { pluginName = "catppuccin"; - version = builtins.substring 0 7 sources.tmux.rev; + version = builtins.substring 0 7 sources.tmux.revision; src = sources.tmux; }; in diff --git a/modules/home-manager/tofi.nix b/modules/home-manager/tofi.nix index aea615f9..6648ed02 100644 --- a/modules/home-manager/tofi.nix +++ b/modules/home-manager/tofi.nix @@ -1,10 +1,9 @@ { config , lib -, sources , ... }: let - inherit (lib) ctp; + inherit (config.catppuccin) sources; cfg = config.programs.tofi.catppuccin; enable = cfg.enable && config.programs.tofi.enable; in diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix index 684e3bb4..1d64149f 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/waybar.nix @@ -1,10 +1,9 @@ { config -, options , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.waybar.catppuccin; enable = cfg.enable && config.programs.waybar.enable; styleFile = "${sources.waybar}/themes/${cfg.flavour}.css"; diff --git a/modules/home-manager/yazi.nix b/modules/home-manager/yazi.nix index 415b67c0..839c9cf4 100644 --- a/modules/home-manager/yazi.nix +++ b/modules/home-manager/yazi.nix @@ -1,10 +1,11 @@ { config , lib -, sources , ... }: let inherit (lib) ctp; + inherit (config.catppuccin) sources; + cfg = config.programs.yazi.catppuccin; enable = cfg.enable && config.programs.yazi.enable; in diff --git a/modules/home-manager/zathura.nix b/modules/home-manager/zathura.nix index d19c4329..d7fda432 100644 --- a/modules/home-manager/zathura.nix +++ b/modules/home-manager/zathura.nix @@ -1,10 +1,10 @@ { config , pkgs , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.programs.zathura.catppuccin; enable = cfg.enable && config.programs.zathura.enable; themeFile = sources.zathura + /src/catppuccin-${cfg.flavour}; diff --git a/modules/home-manager/zsh-syntax-highlighting.nix b/modules/home-manager/zsh-syntax-highlighting.nix index c849c90d..427304a2 100644 --- a/modules/home-manager/zsh-syntax-highlighting.nix +++ b/modules/home-manager/zsh-syntax-highlighting.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; inherit (lib) ctp; cfg = config.programs.zsh.syntaxHighlighting.catppuccin; enable = cfg.enable && config.programs.zsh.syntaxHighlighting.enable; diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 9a3beb31..c7843c95 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -4,6 +4,10 @@ , ... }: let + # this is a recursive attribute with all the functions below + inherit (lib) ctp; +in +{ # string -> type -> string -> a -> a # this is an internal function and shouldn't be # used unless you know what you're doing. it takes @@ -21,7 +25,7 @@ let # this creates a flavour option for modules # the first string should be the name of the module, # followed by the local config attrset - mkFlavourOpt = mkBasicOpt "flavour" types.flavourOption; + mkFlavourOpt = ctp.mkBasicOpt "flavour" ctp.types.flavourOption; types = { flavourOption = lib.types.enum [ "latte" "frappe" "macchiato" "mocha" ]; @@ -42,47 +46,37 @@ let "yellow" ]; }; -in -{ - inherit mkBasicOpt mkFlavourOpt types; # string -> string # this capitalizes the first letter in a string, # which is sometimes needed in order to format # the names of themes correctly mkUpper = str: - with builtins; - (lib.toUpper (substring 0 1 str)) + (substring 1 (stringLength str) str); + (lib.toUpper (builtins.substring 0 1 str)) + (builtins.substring 1 (builtins.stringLength str) str); # a -> path -> a # fromJSON but for yaml (and without readFile) # a should be the local pkgs attrset fromYaml = file: let - inherit (builtins) fromJSON readFile; - # convert to json - json = with pkgs; - runCommand "converted.json" { } '' - ${yj}/bin/yj < ${file} > $out - ''; + json = pkgs.runCommand "converted.json" { } '' + ${lib.getExe pkgs.yj} < ${file} > $out + ''; in - fromJSON (readFile json); + builtins.fromJSON (builtins.readFile json); # a -> path -> a # fromJSON but for ini (and without readFile) # a should be the local pkgs attrset fromINI = file: let - inherit (builtins) fromJSON readFile; - # convert to json - json = with pkgs; - runCommand "converted.json" { } '' - ${jc}/bin/jc --ini < ${file} > $out - ''; + json = pkgs.runCommand "converted.json" { } '' + ${lib.getExe pkgs.jc} --ini < ${file} > $out + ''; in - fromJSON (readFile json); + builtins.fromJSON (builtins.readFile json); # a -> path -> a # fromJSON but for raw ini (and without readFile) @@ -108,20 +102,21 @@ in enable = lib.mkEnableOption "Catppuccin theme" // { default = config.catppuccin.enable; }; - flavour = mkFlavourOpt name; + flavour = ctp.mkFlavourOpt name; }; # string -> a -> a # this creates an accent option for modules # the first string should be the name of the module, # followed by the local config attrset - mkAccentOpt = mkBasicOpt "accent" types.accentOption; + mkAccentOpt = ctp.mkBasicOpt "accent" ctp.types.accentOption; assertXdgEnabled = name: { assertion = config.xdg.enable; message = "Option xdg.enable must be enabled to apply Catppuccin theming for ${name}"; }; + # a -> a -> a # see https://nlewo.github.io/nixos-manual-sphinx/development/option-types.xml.html # by default enums cannot be merged, but they keep their passed value in `functor.payload`. # `functor.binOp` can merge those values diff --git a/modules/lib/mkImports.nix b/modules/lib/mkImports.nix index 8eaa61f0..07c0a7b7 100644 --- a/modules/lib/mkImports.nix +++ b/modules/lib/mkImports.nix @@ -3,20 +3,19 @@ { lib, pkgs, ... }@args: dir: let - generated = pkgs.callPackage ../../_sources/generated.nix { }; + # instead of letting `evalModules` pass arguments to each file + # in our list, we import them directly + applyImports = file: _: import "${dir}/${file}" (args // { + lib = lib.extend (final: _: { + ctp = import ./. (args // { lib = final; }); + }); + + defaultSources = import ../../.sources; + }); in lib.pipe dir [ builtins.readDir builtins.attrNames - - (builtins.filter ( - n: !(builtins.elem n [ "default.nix" ]) - )) - - (map ( - f: _: import "${dir}/${f}" (args // { - sources = builtins.mapAttrs (_: p: p.src) generated; - lib = lib.extend (_: _: { ctp = import ./. args; }); - }) - )) + (lib.remove "default.nix") + (map applyImports) ] diff --git a/modules/nixos/console.nix b/modules/nixos/console.nix index 800645a5..37d20db4 100644 --- a/modules/nixos/console.nix +++ b/modules/nixos/console.nix @@ -1,9 +1,9 @@ { config , lib -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.console.catppuccin; enable = cfg.enable && config.console.enable; palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; diff --git a/modules/nixos/globals.nix b/modules/nixos/globals.nix index 213ccc15..1c9b1f8e 100644 --- a/modules/nixos/globals.nix +++ b/modules/nixos/globals.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{ lib, defaultSources, ... }: { options.catppuccin = { enable = lib.mkEnableOption "Catppuccin globally"; @@ -13,5 +13,14 @@ default = "mauve"; description = "Global Catppuccin accent"; }; + + sources = lib.mkOption { + type = lib.types.lazyAttrsOf lib.types.raw; + default = defaultSources; + # HACK! + # without this, overriding one source will delete all others. -@getchoo + apply = lib.recursiveUpdate defaultSources; + description = "Port sources used across all options"; + }; }; } diff --git a/modules/nixos/grub.nix b/modules/nixos/grub.nix index 78b48ca0..b4994b62 100644 --- a/modules/nixos/grub.nix +++ b/modules/nixos/grub.nix @@ -1,10 +1,10 @@ { config , lib , pkgs -, sources , ... }: let + inherit (config.catppuccin) sources; cfg = config.boot.loader.grub.catppuccin; enable = cfg.enable && config.boot.loader.grub.enable; diff --git a/nvfetcher.toml b/nvfetcher.toml deleted file mode 100644 index 8485978d..00000000 --- a/nvfetcher.toml +++ /dev/null @@ -1,147 +0,0 @@ -[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" - -[cava] -src.git = "https://github.com/catppuccin/cava.git" -fetch.github = "catppuccin/cava" - -[delta] -src.git = "https://github.com/catppuccin/delta.git" -fetch.github = "catppuccin/delta" - -[dunst] -src.git = "https://github.com/catppuccin/dunst.git" -fetch.github = "catppuccin/dunst" - -[fcitx5] -src.git = "https://github.com/catppuccin/fcitx5.git" -fetch.github = "catppuccin/fcitx5" - -[fish] -src.git = "https://github.com/catppuccin/fish.git" -fetch.github = "catppuccin/fish" - -[foot] -src.git = "https://github.com/catppuccin/foot.git" -fetch.github = "catppuccin/foot" - -[gh-dash] -src.git = "https://github.com/catppuccin/gh-dash.git" -fetch.github = "catppuccin/gh-dash" - -[gitui] -src.git = "https://github.com/catppuccin/gitui.git" -fetch.github = "catppuccin/gitui" - -[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" - -[helix] -src.git = "https://github.com/catppuccin/helix.git" -fetch.github = "catppuccin/helix" - -[hyprland] -src.git = "https://github.com/catppuccin/hyprland.git" -fetch.github = "catppuccin/hyprland" - -[imv] -src.git = "https://github.com/catppuccin/imv.git" -fetch.github = "catppuccin/imv" - -[k9s] -src.git = "https://github.com/catppuccin/k9s.git" -fetch.github = "catppuccin/k9s" - -[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" - -[mpv] -src.git = "https://github.com/catppuccin/mpv.git" -fetch.github = "catppuccin/mpv" - -[neovim] -src.git = "https://github.com/catppuccin/nvim.git" -fetch.github = "catppuccin/nvim" - -[palette] -src.git = "https://github.com/catppuccin/palette" -fetch.github = "catppuccin/palette" - -[polybar] -src.git = "https://github.com/catppuccin/polybar.git" -fetch.github = "catppuccin/polybar" - -[rio] -src.git = "https://github.com/catppuccin/rio.git" -fetch.github = "catppuccin/rio" - -[rofi] -src.git = "https://github.com/catppuccin/rofi.git" -fetch.github = "catppuccin/rofi" - -[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" - -[swaylock] -src.git = "https://github.com/catppuccin/swaylock.git" -fetch.github = "catppuccin/swaylock" - -[tmux] -src.git = "https://github.com/catppuccin/tmux.git" -fetch.github = "catppuccin/tmux" - -[tofi] -src.git = "https://github.com/catppuccin/tofi.git" -fetch.github = "catppuccin/tofi" - -[waybar] -src.git = "https://github.com/catppuccin/waybar.git" -fetch.github = "catppuccin/waybar" - -[yazi] -src.git = "https://github.com/catppuccin/yazi.git" -fetch.github = "catppuccin/yazi" - -[zathura] -src.git = "https://github.com/catppuccin/zathura.git" -fetch.github = "catppuccin/zathura" - -[zsh-syntax-highlighting] -src.git = "https://github.com/catppuccin/zsh-syntax-highlighting.git" -fetch.github = "catppuccin/zsh-syntax-highlighting" diff --git a/test.nix b/test.nix index ab577dbe..8a309a50 100644 --- a/test.nix +++ b/test.nix @@ -1,7 +1,20 @@ -{ testers, home-manager }: +{ testers, fetchFromGitHub, home-manager }: let common = { - catppuccin.enable = true; + catppuccin = { + enable = true; + sources = { + # this is used to ensure that we are able to apply + # source overrides without breaking the other sources + palette = fetchFromGitHub { + owner = "catppuccin"; + repo = "palette"; + rev = "16726028c518b0b94841de57cf51f14c095d43d8"; # refs/tags/1.1.1~1 + hash = "sha256-qZjMlZFTzJotOYjURRQMsiOdR2XGGba8XzXwx4+v9tk="; + }; + }; + + }; }; # shorthand for enabling a module