New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arangodb: Add a NixOS service #31880
Conversation
This is my first crack at this, so it probably needs extra scrutiny. I based the server arguments on https://github.com/arangodb/arangodb/blob/v3.2.3/scripts/startArangoDBClusterLocal.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few nitpicks :-)
{ config, lib, pkgs, ... }: | ||
let | ||
cfg = config.services.arangodb; | ||
stateDir = "/var/lib/arango"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't make it sense to add an option for this (when I grep
over nixpkgs, it seems as the services that require a statePath
also provide an option for this)
|
||
services.arangodb = { | ||
|
||
enable = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module system provides a mkEnableOption "<description>"
function
--log.file ${stateDir}/arangodb.log \ | ||
--working-directory ${stateDir} \ | ||
--cluster.password root \ | ||
> ${stateDir}/arangodb.stdout 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't systemd log all the output in the journal logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
systemd journal can also differentiate between stdout and stderr.
--javascript.app-path ${stateDir} \ | ||
--log.file ${stateDir}/arangodb.log \ | ||
--working-directory ${stateDir} \ | ||
--cluster.password root \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a secure default to hard-code passwords?
Thanks for the feedback. I will address these this week, and update the PR. |
@earldouglas Did you make any progress on this? |
@bachp No, but I haven't abandoned it yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See @Ma27's comments
Any progress ? I can make it if it's needed. |
@babariviere Sorry, this is still in my personal backlog. Feel free to take it. |
New work in #40167 |
Motivation for this change
Make it easy to launch ArangoDB as a service in NixOS.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)