rulmarc/devenv.nix

57 lines
819 B
Nix
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
pkgs,
lib,
config,
inputs,
...
}:
{
name = "ai-game";
# https://devenv.sh/basics/
env = {
GREET = "🛠 Let's hack ";
};
# https://devenv.sh/scripts/
scripts = {
hello.exec = "echo $GREET";
cat.exec = "bat $@";
build.exec = "go build -o ./bin/";
};
# https://devenv.sh/packages/
packages = with pkgs; [
nixfmt-rfc-style
bat
jq
tealdeer
gopls
air
ncurses
];
languages = {
go.enable = true;
};
enterShell = ''
hello
'';
# https://devenv.sh/pre-commit-hooks/
pre-commit.hooks = {
nixfmt-rfc-style = {
enable = true;
excludes = [ ".devenv.flake.nix" ];
};
yamllint = {
enable = true;
settings.preset = "relaxed";
};
};
# Make diffs fantastic
difftastic.enable = true;
}