Skip to content
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
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/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="

use devenv
25 changes: 25 additions & 0 deletions .github/workflows/devenv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Devenv

on:
push:
branches: [ main ]
paths:
- "/devenv*"
pull_request:
branches: [ main ]
paths-ignore:
- "/devenv*"

jobs:
test-nix-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Build the devenv shell and run any git hooks
run: devenv test
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ book

# Coverage
coverage
.nyc_output
.nyc_output

# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv
1 change: 1 addition & 0 deletions changelog.d/993.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add devenv development files.
175 changes: 175 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1732585607,
"owner": "cachix",
"repo": "devenv",
"rev": "a520f05c40ebecaf5e17064b27e28ba8e70c49fb",
"treeHash": "18c0c037ca6ab98acc83bf17a1abefac00d77e65",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1732689334,
"owner": "nix-community",
"repo": "fenix",
"rev": "a8a983027ca02b363dfc82fbe3f7d9548a8d3dce",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1732722421,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac",
"treeHash": "89dbb8f9bb36708ea4455ee2225a9c60c950f2f7",
"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",
"treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716977621,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "4267e705586473d3e5c8d50299e71503f16a6fb6",
"treeHash": "6d9f1f7ca0faf1bc2eeb397c78a49623260d3412",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1732632634,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6f6076c37180ea3a916f84928cf3a714c5207a30",
"treeHash": "1e15b0cb2baeffc40a2c957508052031b879c401",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-upstream": {
"locked": {
"lastModified": 1732350895,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1732021966,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"treeHash": "434cf02841a1faf9e53437604ffa4b9a92669bff",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"fenix": "fenix",
"nixpkgs": "nixpkgs",
"nixpkgs-upstream": "nixpkgs-upstream",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1732633904,
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "8d5e91c94f80c257ce6dbdfba7bd63a5e8a03fa6",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
24 changes: 24 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ pkgs, lib, config, inputs, ... }:
let
pkgs-upstream = import inputs.nixpkgs-upstream { system = pkgs.stdenv.system; };
in
{
packages = [ pkgs.git pkgs.gcc pkgs.pkg-config pkgs.openssl ];

# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
yarn
'';

# https://devenv.sh/services/
services.redis.enable = true;

# https://devenv.sh/languages/
languages.typescript.enable = true;
languages.javascript.yarn.enable = true;
languages.javascript.enable = true;
languages.javascript.package = pkgs-upstream.nodejs_20;
languages.rust.enable = true;
languages.rust.channel = "stable";
}
10 changes: 10 additions & 0 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
fenix:
url: github:nix-community/fenix
inputs:
nixpkgs:
follows: nixpkgs
nixpkgs-upstream:
url: github:NixOS/nixpkgs/nixos-24.11
Loading