Skip to content
Closed
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
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[justfile]
indent_size = 4
5 changes: 4 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
use flake
# shellcheck shell=bash
if has nix_direnv_version; then
use flake
fi
2 changes: 2 additions & 0 deletions .github/FUNDING.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
github: HeitorAugustoLN
13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
labels:
- dependencies
- github-actions
commit-message:
prefix: ci
include: scope
41 changes: 41 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Flake check
run-name: Flake check for ${{ github.ref_name }} by ${{ github.actor }}
"on":
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
check:
timeout-minutes: 15
name: Check flake on ${{ matrix.system }}
runs-on: ${{ matrix.runner }}
permissions:
contents: read
strategy:
matrix:
include:
- system: aarch64-linux
runner: ubuntu-24.04-arm
- system: x86_64-linux
runner: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
with:
persist-credentials: false
- name: Check flake inputs
uses: DeterminateSystems/flake-checker-action@3164002371bc90729c68af0e24d5aacf20d7c9f6 # v12
with:
fail-mode: true
- name: Set up Nix
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31
- name: Set up Cachix
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
name: heitor
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run flake check
run: nix flake check --accept-flake-config
23 changes: 23 additions & 0 deletions .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Dependabot auto-merge
run-name: Dependabot auto-merge for ${{ github.event.pull_request.title }}
"on": pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
timeout-minutes: 11
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash --delete-branch "$PR_URL"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
25 changes: 0 additions & 25 deletions .github/workflows/flake-check.yaml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/update-flake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Update flake inputs
run-name: Update flake inputs by ${{ github.actor }}
"on":
schedule:
- cron: "0 0 */3 * *" # Every 3 days at midnight UTC
workflow_dispatch:
jobs:
update-flake:
timeout-minutes: 11
name: Update flake inputs
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
with:
persist-credentials: false
- name: Set up Nix
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Configure Git
run: |
git config user.name "heitor-bot[bot]"
git config user.email "246902415+heitor-bot[bot]@users.noreply.github.com"
- name: Update flake.lock
run: |
nix flake update --accept-flake-config --commit-lock-file --option commit-lockfile-summary "chore(deps): update flake"
- name: Get commit message for PR body
id: pr-body
run: |
COMMIT_BODY=$(git log -1 --pretty=%b)
{
echo "pr-body<<EOF"
echo "### Automated flake update"
echo ""
echo "\`\`\`"
echo "$COMMIT_BODY"
echo "\`\`\`"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Create Pull Request
id: pull-request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7
with:
body: ${{ steps.pr-body.outputs.pr-body }}
branch: update-flake-lock
delete-branch: true
labels: |
dependencies
nix
sign-commits: true
title: "chore(deps): update flake"
token: ${{ steps.app-token.outputs.token }}
- name: Enable auto-merge
if: steps.pull-request.outputs.pull-request-number
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PR_URL: ${{ steps.pull-request.outputs.pull-request-url }}
run: gh pr merge --auto --squash --delete-branch "$PR_URL"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.direnv
.direnv/
result*
/.pre-commit-config.yaml
.pre-commit-config.yaml
17 changes: 0 additions & 17 deletions .sops.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .yamlfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
formatter:
type: basic
include_document_start: true
max_line_length: 80
pad_line_comments: 2
5 changes: 5 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
rules:
line-length:
max: 80
level: warning
74 changes: 0 additions & 74 deletions README.md

This file was deleted.

12 changes: 12 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
) { src = ./.; }).defaultNix
Loading