Skip to content

Commit e8885ab

Browse files
committed
nixos/sftpgo: add extraReadWriteDirs option
1 parent 3a66bd1 commit e8885ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

nixos/modules/services/web-apps/sftpgo.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ in
4242
'';
4343
};
4444

45+
extraReadWriteDirs = mkOption {
46+
type = types.listOf types.path;
47+
default = [];
48+
description = ''
49+
Extra directories where SFTPGo is allowed to write to.
50+
'';
51+
};
52+
4553
user = mkOption {
4654
type = types.str;
4755
default = defaultUser;
@@ -324,7 +332,7 @@ in
324332
User = cfg.user;
325333
Group = cfg.group;
326334
WorkingDirectory = cfg.dataDir;
327-
ReadWritePaths = [ cfg.dataDir ];
335+
ReadWritePaths = [ cfg.dataDir ] ++ cfg.extraReadWriteDirs;
328336
LimitNOFILE = 8192; # taken from upstream
329337
KillMode = "mixed";
330338
ExecStart = "${cfg.package}/bin/sftpgo serve ${utils.escapeSystemdExecArgs cfg.extraArgs}";

0 commit comments

Comments
 (0)