tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
gogs: avoid creating symlinks each run
bobvanderlinden.tngl.sh
8 years ago
9d841295
6dc9d21c
+11
-4
2 changed files
expand all
collapse all
unified
split
nixos
modules
services
misc
gogs.nix
pkgs
applications
version-management
gogs
default.nix
+10
nixos/modules/services/misc/gogs.nix
···
25
25
HTTP_ADDR = ${cfg.httpAddress}
26
26
HTTP_PORT = ${toString cfg.httpPort}
27
27
ROOT_URL = ${cfg.rootUrl}
28
28
+
STATIC_ROOT_PATH = ${cfg.staticRootPath}
28
29
29
30
[session]
30
31
COOKIE_NAME = session
···
175
176
'';
176
177
};
177
178
179
179
+
staticRootPath = mkOption {
180
180
+
type = types.str;
181
181
+
default = "${pkgs.gogs.data}";
182
182
+
example = "/var/lib/gogs/data";
183
183
+
description = "Upper level of template and static files path.";
184
184
+
};
185
185
+
178
186
extraConfig = mkOption {
179
187
type = types.str;
180
188
default = "";
···
195
203
runConfig = "${cfg.stateDir}/custom/conf/app.ini";
196
204
secretKey = "${cfg.stateDir}/custom/conf/secret_key";
197
205
in ''
206
206
+
mkdir -p ${cfg.stateDir}
207
207
+
198
208
# copy custom configuration and generate a random secret key if needed
199
209
${optionalString (cfg.useWizard == false) ''
200
210
mkdir -p ${cfg.stateDir}/custom/conf
+1
-4
pkgs/applications/version-management/gogs/default.nix
···
33
33
cp -R $src/{public,templates} $data
34
34
35
35
wrapProgram $bin/bin/gogs \
36
36
-
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} \
37
37
-
--run 'export GOGS_WORK_DIR=''${GOGS_WORK_DIR:-$PWD}' \
38
38
-
--run 'mkdir -p "$GOGS_WORK_DIR" && cd "$GOGS_WORK_DIR"' \
39
39
-
--run "ln -fs $data/{public,templates} ."
36
36
+
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
40
37
'';
41
38
42
39
goPackagePath = "github.com/gogits/gogs";