Skip to content

Commit da205b6

Browse files
committed
chore: Setup devenv
1 parent 2f67592 commit da205b6

File tree

3 files changed

+281
-0
lines changed

3 files changed

+281
-0
lines changed

.envrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
2+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
3+
fi
4+
5+
nix_direnv_watch_file devenv.nix
6+
nix_direnv_watch_file devenv.lock
7+
nix_direnv_watch_file devenv.yaml
8+
if ! use flake . --impure
9+
then
10+
echo "devenv could not be build. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
11+
fi

flake.lock

Lines changed: 234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
4+
systems.url = "github:nix-systems/default";
5+
devenv.url = "github:cachix/devenv";
6+
};
7+
8+
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
9+
let
10+
forEachSystem = nixpkgs.lib.genAttrs (import systems);
11+
in
12+
{
13+
devShells = forEachSystem
14+
(system:
15+
let
16+
pkgs = nixpkgs.legacyPackages.${system};
17+
in
18+
{
19+
default = devenv.lib.mkShell {
20+
inherit inputs pkgs;
21+
modules = [
22+
{
23+
# https://devenv.sh/reference/options/
24+
packages = with pkgs; [
25+
just
26+
vale
27+
nodejs
28+
hunspellDicts.en-us-large
29+
];
30+
env.DICPATH = "${pkgs.hunspellDicts.en-us-large}/share/hunspell";
31+
}
32+
];
33+
};
34+
});
35+
};
36+
}

0 commit comments

Comments
 (0)