Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary IFD + add auto updates & testing #40

Merged
merged 17 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI
name: Format

on:
- push
- pull_request

jobs:
Check:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test-vm.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 41 additions & 0 deletions .github/workflows/update-lock.yml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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. -->
Commits that add ports should be of the format

Expand Down
Loading
Loading