Bug description
When instantiating the codiMD service (in a container) the user is not automatically created and the installation fails
To Reproduce
Steps to reproduce the behavior:
services.codimd = {
enable = true;
configuration = {
allowAnonymousEdits = true;
allowEmailRegister = false;
debug = false;
domain = "my.domain.com";
dbURL = "postgres://user:[email protected]:5432/database";
email = false;
host = "0.0.0.0";
useCDN = false;
};
};
sudo nixos-rebuild testbuilding '/nix/store/nn42kqlqnpgvhzpkjbjb1bg66iqcrzx5-codimd-config.json.drv'...
building '/nix/store/cff83vmabqvzd66d7n9m3lbaygg2ws5v-codimd.drv'...
unpacking sources
unpacking source archive /nix/store/zh502w4z41rm0mdnzrjdlwria62c2sw1-source
source root is source
patching sources
configuring
building
/build/source/deps/CodiMD/node_modules/codemirror /build/source/deps/CodiMD
> [email protected] install /build/source/deps/CodiMD/node_modules/codemirror
> npm run-script build && node release
> [email protected] build /build/source/deps/CodiMD/node_modules/codemirror
> rollup -c
src/codemirror.js โ lib/codemirror.js...
(!) Circular dependency: src/display/highlight_worker.js -> src/display/operations.js -> src/display/scrollbars.js -> src/display/scrolling.js -> src/display/highlight_worker.js
(!) Circular dependency: src/display/line_numbers.js -> src/display/update_display.js -> src/display/highlight_worker.js -> src/display/operations.js -> src/display/scrollbars.js -> src/display/scrolling.js -> src/display/line_numbers.js
(!) Circular dependency: src/display/update_display.js -> src/display/highlight_worker.js -> src/display/operations.js -> src/display/scrollbars.js -> src/display/scrolling.js -> src/display/update_display.js
(!) Circular dependency: src/display/update_display.js -> src/display/highlight_worker.js -> src/display/operations.js -> src/display/update_display.js
(!) Circular dependency: src/display/line_numbers.js -> src/display/update_display.js -> src/display/line_numbers.js
(!) Circular dependency: src/edit/CodeMirror.js -> src/model/Doc.js -> src/edit/CodeMirror.js
created lib/codemirror.js in 1.9s
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ npm update check failed โ
โ Try running with sudo or get access โ
โ to the local update config store via โ
โ sudo chown -R $USER:$(id -gn $USER) /homeless-shelter/.config โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WARN: Non-strict equality against boolean: == false [lib/codemirror.js:593,61]
WARN: Non-strict equality against boolean: != false [addon/comment/comment.js:107,55]
WARN: Non-strict equality against boolean: != false [addon/comment/comment.js:120,10]
WARN: Non-strict equality against boolean: != false [addon/merge/merge.js:214,15]
WARN: Non-strict equality against boolean: == false [mode/javascript/javascript.js:446,13]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ npm update check failed โ
โ Try running with sudo or get access โ
โ to the local update config store via โ
โ sudo chown -R $USER:$(id -gn $USER) /homeless-shelter/.config โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/build/source/deps/CodiMD
/build/source/deps/CodiMD/node_modules/sqlite3 /build/source/deps/CodiMD
> [email protected] install /build/source/deps/CodiMD/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error getaddrinfo ENOTFOUND mapbox-node-binary.s3.amazonaws.com mapbox-node-binary.s3.amazonaws.com:443
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad
gyp ERR! stack network settings.
gyp ERR! stack at Request.<anonymous> (/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:170:21)
gyp ERR! stack at Request.emit (events.js:198:13)
gyp ERR! stack at Request.onRequestError (/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/lib/node_modules/npm/node_modules/request/request.js:881:8)
gyp ERR! stack at ClientRequest.emit (events.js:198:13)
gyp ERR! stack at TLSSocket.socketErrorListener (_http_client.js:392:9)
gyp ERR! stack at TLSSocket.emit (events.js:198:13)
gyp ERR! stack at emitErrorNT (internal/streams/destroy.js:91:8)
gyp ERR! stack at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:63:19)
gyp ERR! System Linux 4.19.84
gyp ERR! command "/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/bin/node" "/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/lib/node_modules/npm/no
de_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite
3.node" "--module_name=node_sqlite3" "--module_path=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64" "--napi_version=5" "--node_abi_napi=nap
i" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /build/source/deps/CodiMD/node_modules/sqlite3
gyp ERR! node -v v10.17.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/bin/node /nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/build/source/deps/CodiMD/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.19.84
node-pre-gyp ERR! command "/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/bin/node" "/build/source/deps/CodiMD/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /build/source/deps/CodiMD/node_modules/sqlite3
node-pre-gyp ERR! node -v v10.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/bin/node /nix/store/q9w5wr11lv7mzlk1rv7sjbvs8j57csxd-nodejs-10.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/build/source/deps/CodiMD/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /build/source/deps/CodiMD/node_modules/sqlite3/.npm/_logs/2019-11-18T16_15_28_157Z-debug.log
builder for '/nix/store/cff83vmabqvzd66d7n9m3lbaygg2ws5v-codimd.drv' failed with exit code 1
cannot build derivation '/nix/store/h4mr7rj53iw3v0xvl9f35nyglpm5jzar-unit-codimd.service.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pzh6q5m18xr70mh1q5m6rq5732fvpji7-system-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xiqnqlpvgp3901j232my54jdkp1jzd9h-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ncqna33q53jmabjian2rkql098dx4lkk-nixos-system-XXXXX-19.09.1258.07e66484e67.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/k8y4f7ckq2znzc598vj7prdqbzva36xd-etc-XXXXX.conf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kw34bz233wgdn2lf0shwkkriy56pfwmk-unit-container-XXXXXX.service.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/89b988js6mmbaxavj31zaaphwwk9j8fn-system-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/n0db68awdc8y3g1xwqsic0lvrdi56aja-etc.drv': 2 dependencies couldn't be built
Expected behavior
Service instantiation, at least installed and configured as declared.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
- system: `"x86_64-linux"`
- host os: `Linux 4.19.84, NixOS, 19.09.1258.07e66484e67 (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3`
- channels(root): `"nixos-19.09.1258.07e66484e67"`
- channels(gbiscuolo): `"nixos-19.03.172764.50d5d73e22b"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Have I done something wrong in my configuration?
Thanks! Gio'
ping @WilliButz @Ma27
This is fixed by ba307dd1765df1c611e63422863651bbe540e592
Most helpful comment
This is fixed by ba307dd1765df1c611e63422863651bbe540e592