mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/sftpgo: add extraReadWriteDirs option
This commit is contained in:
parent
3a66bd1dc7
commit
e8885abab9
1 changed files with 9 additions and 1 deletions
|
@ -42,6 +42,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
extraReadWriteDirs = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Extra directories where SFTPGo is allowed to write to.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = defaultUser;
|
||||
|
@ -324,7 +332,7 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
ReadWritePaths = [ cfg.dataDir ];
|
||||
ReadWritePaths = [ cfg.dataDir ] ++ cfg.extraReadWriteDirs;
|
||||
LimitNOFILE = 8192; # taken from upstream
|
||||
KillMode = "mixed";
|
||||
ExecStart = "${cfg.package}/bin/sftpgo serve ${utils.escapeSystemdExecArgs cfg.extraArgs}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue