Skip to content

Commit

Permalink
chore: update Flakebox
Browse files Browse the repository at this point in the history
  • Loading branch information
dpc committed Oct 6, 2023
1 parent b25990e commit f9f675f
Show file tree
Hide file tree
Showing 11 changed files with 290 additions and 107 deletions.
1 change: 1 addition & 0 deletions .config/flakebox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3554312299f8e740fd7f014bd4d18799b87f19c9dc1b3a4c3b5a35e6bd9082e103b0707dce95efe3a67a76828fa178541066c309c57812893d9e306648e5a52e
22 changes: 22 additions & 0 deletions .config/flakebox/shellHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
rm -f "${dot_git}/hooks/commit-msg"
ln -sf "$(pwd)/misc/git-hooks/commit-msg" "${dot_git}/hooks/commit-msg"

dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
rm -f "${dot_git}/hooks/pre-commit"
ln -sf "$(pwd)/misc/git-hooks/pre-commit" "${dot_git}/hooks/pre-commit"

# set template
git config commit.template misc/git-hooks/commit-template.txt

if [ -n "${DIRENV_IN_ENVRC:-}" ]; then
# and not set DIRENV_LOG_FORMAT
if [ -n "${DIRENV_LOG_FORMAT:-}" ]; then
>&2 echo "💡 Set 'DIRENV_LOG_FORMAT=\"\"' in your shell environment variables for a cleaner output of direnv"
fi
fi

>&2 echo "💡 Run 'just' for a list of available 'just ...' helper recipes"
26 changes: 21 additions & 5 deletions .github/workflows/flakebox-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION

jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Flake
run: '# run the same check that git `pre-commit` hook does
nix flake check .#
- name: Build on ${{ matrix.host }}
run: 'nix flake check .#
'
strategy:
matrix:
host:
- macos
- linux
include:
- host: linux
runs-on: ubuntu-latest
timeout: 60
- host: macos
runs-on: macos-12
timeout: 60
timeout-minutes: ${{ matrix.timeout }}
flake:
name: Flake self-check
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,3 +73,6 @@ name: CI
tags:
- v*
workflow_dispatch: {}


# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
14 changes: 10 additions & 4 deletions .github/workflows/flakebox-flakehub-publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION

jobs:
flakehub-publish:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '${{ (inputs.tag != null) && format(''refs/tags/{0}'', inputs.tag) ||
'''''' }}
'
ref: ${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || ''
}}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Flakehub Push
Expand All @@ -27,3 +30,6 @@ name: Publish to Flakehub
description: The existing tag to publish to FlakeHub
required: true
type: string


# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
4 changes: 4 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
group_imports = "StdExternalCrate"
wrap_comments = true
format_code_in_doc_comments = true
imports_granularity = "Module"
153 changes: 133 additions & 20 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f9f675f

Please sign in to comment.