Skip to content

Commit

Permalink
feat: nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jun 3, 2024
1 parent 9ad3f14 commit e02f0d4
Show file tree
Hide file tree
Showing 7 changed files with 1,484 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if has nix_direnv_version; then
use flake
fi
47 changes: 47 additions & 0 deletions .github/workflows/flakehub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to FlakeHub

on:
push:
branches: [main]
paths: ["**.nix", "**.rs", "Cargo.lock"]
pull_request:
paths: ["**.nix", "**.rs", "Cargo.lock"]
workflow_dispatch:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

permissions:
id-token: write
contents: read

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Setup cachix
uses: cachix/cachix-action@v15
with:
name: catppuccin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Flake check
run: nix flake check -Lv

- name: Build packages
run: nix build -L .

- uses: DeterminateSystems/flakehub-push@main
# only push to FlakeHub once when running on main
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
with:
name: catppuccin/whiskers
rolling: true
visibility: public
Loading

0 comments on commit e02f0d4

Please sign in to comment.