Skip to content

Commit

Permalink
pumpio service: adjust upload directory config for 3.0.0
Browse files Browse the repository at this point in the history
These changes are backwards compatible.
  • Loading branch information
rvl authored and Mic92 committed Mar 12, 2017
1 parent 252e58a commit f1a1490
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion nixos/modules/services/web-apps/pump.io.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ let
smtpfrom = cfg.smtpFrom;

nologger = false;
uploaddir = "${dataDir}/uploads";
enableUploads = cfg.enableUploads;
datadir = dataDir;
debugClient = false;
firehose = cfg.firehose;
disableRegistration = cfg.disableRegistration;
Expand Down Expand Up @@ -152,6 +153,15 @@ in
'';
};

enableUploads = mkOption {
type = types.bool;
default = true;
description = ''
If you want to disable file uploads, set this to false. Uploaded files will be stored
in ${dataDir}/uploads.
'';
};

sslKey = mkOption {
type = types.path;
example = "${dataDir}/myserver.key";
Expand Down Expand Up @@ -341,7 +351,15 @@ in
{ description = "pump.io social network stream server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];

preStart = ''
mkdir -p ${dataDir}/uploads
chown pumpio:pumpio ${dataDir}/uploads
chmod 770 ${dataDir}/uploads
'';

serviceConfig.ExecStart = "${pkgs.pumpio}/bin/pump -c /etc/pump.io.json";
PermissionsStartOnly = true;
serviceConfig.User = if cfg.port < 1024 then "root" else user;
serviceConfig.Group = user;
};
Expand Down

0 comments on commit f1a1490

Please sign in to comment.