-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
61 lines (59 loc) · 1.18 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ pkgs, ... }:
let
my-opentofu = pkgs.opentofu.withPlugins (ps: with ps; [
sops
alicloud
authentik
ldap
local
keycloak
]);
in
{
enterShell = ''
export PATH=$PATH:$PWD/scripts
'';
languages.javascript.enable = true;
languages.javascript.npm.enable = true;
# This is your devenv configuration
packages = with pkgs; [
colmena
fzf # for just
just
my-opentofu
nix-update
sops
nvfetcher
nushell
delta
# for keyscan
ssh-to-age
# for reinstall
nixos-anywhere
];
pre-commit.hooks.nixpkgs-fmt.enable = true;
pre-commit.hooks.my-opentofu-fmt = {
enable = true;
name = "opentofu-fmt";
entry = "${my-opentofu}/bin/tofu fmt";
files = "\\.tf$";
};
pre-commit.hooks.pre-commit-hook-ensure-sops = {
enable = true;
# FIXME: doesn't support env file
files = "secrets\\.(yaml|json)$";
};
pre-commit.hooks.just-fmt =
let
script = with pkgs; writeShellScript "just-fmt" ''
for file in "$@"; do
${pkgs.just}/bin/just --fmt --unstable -f "$file";
done
'';
in
{
enable = true;
entry = "${script}";
files = "justfile$";
};
}