-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
45 lines (38 loc) · 835 Bytes
/
devenv.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ pkgs, config, ... }:
let
python-packages =
p: with p; [
pip
python-lsp-server
];
in
{
# https://devenv.sh/basics/
env.GREET = "🛠️ Let's hack 🧑🏻💻";
# # https://devenv.sh/packages/
packages = with pkgs; [
(python3.withPackages python-packages)
ansible_2_14
nh
nixd
];
# https://devenv.sh/scripts/
scripts.hello.exec = "echo $GREET";
enterShell = ''
hello
'';
# https://devenv.sh/languages/
languages.nix.enable = true;
languages.python.enable = true;
# Make diffs fantastic
difftastic.enable = true;
# Enable codespaces
devcontainer.enable = true;
# https://devenv.sh/pre-commit-hooks/
pre-commit.hooks = {
shellcheck.enable = true;
black.enable = true;
nixfmt-rfc-style.enable = true;
yamllint.enable = true;
};
}