-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
68 lines (61 loc) · 1.82 KB
/
Copy pathdevenv.nix
File metadata and controls
68 lines (61 loc) · 1.82 KB
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
62
63
64
65
66
67
68
{ pkgs, config, lib, ... }:
# See full reference at https://devenv.sh/reference/options/
{
packages = with pkgs; [
d2 # https://d2lang.com/
];
# https://devenv.sh/languages/
languages.nix.enable = true;
languages.typescript.enable = true;
process.implementation = "process-compose";
processes =
let
d2-file-to-process = filename:
{
exec = ''
exec ${pkgs.d2}/bin/d2 --theme="200" \
--layout=elk -w --pad=70 \
--elk-algorithm=layered \
--elk-nodeNodeBetweenLayers=10 \
--elk-padding="[top=10,left=10,bottom=10,right=10]" \
--elk-edgeNodeBetweenLayers=60 \
--elk-nodeSelfLoop=10 \
d2/${filename}.d2 \
public/static/images/${filename}.svg
'';
process-compose = {
namespace = "d2";
disabled = true; # start manually
availability.restart = "always";
};
};
in
{
nextjs = {
exec = "exec yarn dev";
process-compose = {
availability.restart = "on_failure";
};
};
env-sync = (d2-file-to-process "env-sync");
env-sync-vertical = (d2-file-to-process "env-sync-vertical");
spreadsheet-import = (d2-file-to-process "spreadsheet-import");
spreadsheet-import-vertical = (d2-file-to-process "spreadsheet-import-vertical");
};
pre-commit.hooks = {
nixpkgs-fmt.enable = true;
shellcheck.enable = true;
# markdownlint.enable = true;
};
pre-commit.settings.markdownlint.config = {
MD013 = {
line_length = 120;
};
MD033 = false;
MD034 = false;
};
enterShell = ''
ln -sf ${config.process-managers.process-compose.configFile} ${config.env.DEVENV_ROOT}/process-compose.yml
'';
# devenv.debug = true;
}