diff options
author | Rodney Lorrimar <dev@rodney.id.au> | 2017-03-10 22:34:42 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-03-12 16:00:57 +0100 |
commit | f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a (patch) | |
tree | db2ea2009c784daa775288c225b64b2c946a5733 /nixos | |
parent | 252e58a95e395d34a8d3925639ba565d0632eaf8 (diff) | |
download | nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar.gz nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar.bz2 nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar.lz nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar.xz nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.tar.zst nixlib-f1a1490135aaf4d2f1fe9b4001cc40718c6ebf2a.zip |
pumpio service: adjust upload directory config for 3.0.0
These changes are backwards compatible.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/pump.io.nix | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/pump.io.nix b/nixos/modules/services/web-apps/pump.io.nix index b7c64bc6940b..b946aa28477f 100644 --- a/nixos/modules/services/web-apps/pump.io.nix +++ b/nixos/modules/services/web-apps/pump.io.nix @@ -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; @@ -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"; @@ -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; }; |