File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
nixos/modules/services/web-apps Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 3535 } ;
3636
3737 dataDir = mkOption {
38- type = types . str ;
38+ type = types . path ;
3939 default = "/var/lib/sftpgo" ;
4040 description = ''
4141 The directory where SFTPGo stores its data files.
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 ;
6371 type = with types ; nullOr path ;
6472 description = ''
6573 Path to a json file containing users and folders to load (or update) on startup.
66- Check the [documentation](https://github.com/drakkan/sftpgo/blob/main/docs/full-configuration.md )
74+ Check the [documentation](https://sftpgo. github.io/latest/config-file/ )
6775 for the `--loaddata-from` command line argument for more info.
6876 '' ;
6977 } ;
7280 default = { } ;
7381 description = ''
7482 The primary sftpgo configuration. See the
75- [configuration reference](https://github.com/drakkan/sftpgo/blob/main/docs/full-configuration.md )
83+ [configuration reference](https://sftpgo. github.io/latest/config-file/ )
7684 for possible values.
7785 '' ;
7886 type = with types ; submodule {
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 } " ;
You can’t perform that action at this time.
0 commit comments