File tree 1 file changed +28
-15
lines changed
1 file changed +28
-15
lines changed Original file line number Diff line number Diff line change 19
19
bash
20
20
cairo
21
21
curl
22
- docker
23
22
drpc . defaultPackage . ${ system }
24
- exa
25
23
gcc
26
24
getopt
27
25
git
35
33
gotestsum
36
34
jq
37
35
kubernetes-helm
36
+ less
38
37
mockgen
39
38
nfpm
40
- nix
41
39
nodejs
42
40
nodePackages . pnpm
43
41
nodePackages . prettier
52
50
protobuf
53
51
protoc-gen-go
54
52
ripgrep
55
- screen
56
53
shellcheck
57
54
shfmt
58
55
sqlc
67
64
zsh
68
65
zstd
69
66
] ;
67
+ # We separate these to reduce the size of the dev shell for packages that we only
68
+ # want in the image.
69
+ devImagePackages = with pkgs ; [
70
+ docker
71
+ exa
72
+ nix
73
+ nixpkgs-fmt
74
+ screen
75
+ ] ;
70
76
71
77
# This is the base image for our Docker container used for development.
72
78
# Use `nix-prefetch-docker ubuntu --arch amd64 --image-tag lunar` to get this.
102
108
# Environment variables that live in `/etc/environment` in the container.
103
109
# These will also be applied to the container config.
104
110
devEnvVars = [
105
- "PATH=${ pkgs . lib . makeBinPath devShellPackages } :/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/coder/go/bin"
111
+ "PATH=${ pkgs . lib . makeBinPath ( devShellPackages ++ devImagePackages ) } :/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/coder/go/bin"
106
112
# This setting prevents Go from using the public checksum database for
107
113
# our module path prefixes. It is required because these are in private
108
114
# repositories that require authentication.
153
159
experimental-features = nix-command flakes
154
160
''
155
161
)
162
+ # Allow people to change shells!
163
+ (
164
+ pkgs . writeTextDir "etc/shells" ''
165
+ ${ pkgs . bash } /bin/bash
166
+ ${ pkgs . zsh } /bin/zsh
167
+ ''
168
+ )
156
169
# This is the debian script for managing Docker with `sudo service docker ...`.
157
170
(
158
171
pkgs . writeTextFile {
189
202
cp -a ${ pkgs . glibcLocales } /lib/locale/locale-archive usr/lib/locale/locale-archive
190
203
'' ;
191
204
192
- config = {
193
- Env = devEnvVars ;
194
- Entrypoint = [ "/bin/bash" ] ;
195
- User = "coder" ;
196
- } ;
205
+ config = {
206
+ Env = devEnvVars ;
207
+ Entrypoint = [ "/bin/bash" ] ;
208
+ User = "coder" ;
209
+ } ;
197
210
} ;
198
- in
199
- {
211
+ in
212
+ {
200
213
packages = {
201
214
devEnvImage = devEnvImage ;
202
215
} ;
203
216
defaultPackage = formatter ; # or replace it with your desired default package.
204
217
devShell = pkgs . mkShell { buildInputs = devShellPackages ; } ;
205
- }
206
- ) ;
207
- }
218
+ }
219
+ ) ;
220
+ }
You can’t perform that action at this time.
0 commit comments