Skip to content

Commit

Permalink
Use devenv.sh to manage tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Jan 29, 2025
1 parent b00e452 commit 7f51b25
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="

use devenv
37 changes: 0 additions & 37 deletions .github/actions/setup-toolchain/action.yml

This file was deleted.

13 changes: 8 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ jobs:
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup toolchain
uses: ./.github/actions/setup-toolchain
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build
shell: devenv shell bash -- -e {0}
run: mdbook build

- name: Publish to Cloudflare Pages
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup toolchain
uses: ./.github/actions/setup-toolchain
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build
shell: devenv shell bash -- -e {0}
run: mdbook build

- name: Publish to Cloudflare Pages
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
out

# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv
100 changes: 100 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1738175053,
"owner": "cachix",
"repo": "devenv",
"rev": "cf1d4aa532b3d3169435e26c8d45f11199d4c5d3",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733477122,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737465171,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
}
},
"root": "root",
"version": 7
}
6 changes: 6 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ pkgs, ... }: {
packages = with pkgs; [
mdbook
mdbook-linkcheck
];
}
4 changes: 4 additions & 0 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling

0 comments on commit 7f51b25

Please sign in to comment.