Skip to content
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

prosody module: add dataDir option #35540

Closed
wants to merge 1 commit into from
Closed

prosody module: add dataDir option #35540

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 25, 2018

Motivation for this change

Allow user to use custom path for stateful data directory.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -247,6 +247,12 @@ in
description = "Additional prosody configuration";
};

dataDir = mkOption {
type = types.string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be types.path.

@@ -318,7 +324,8 @@ in
serviceConfig = {
User = "prosody";
Type = "forking";
PIDFile = "/var/lib/prosody/prosody.pid";
RuntimeDirectory = [ "prosody" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, this will create a directory /run/prosody, but you're using /var/run/prosody. See https://www.freedesktop.org/software/systemd/man/systemd.exec.html.
And please add a comment what the option does so others don't have to look it up.

@ghost
Copy link
Author

ghost commented Feb 25, 2018

@dotlambda Done, thanks!

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I haven't tested it though.

@ghost
Copy link
Author

ghost commented Mar 29, 2018

cc @globin @fpletz

@ghost ghost mentioned this pull request Apr 11, 2018
8 tasks
@ghost
Copy link
Author

ghost commented Apr 11, 2018

#38643

@ghost ghost closed this Apr 11, 2018
@ghost ghost deleted the prosody branch April 11, 2018 17:18
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants