diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-11-15 07:01:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-15 07:01:04 +0100 |
commit | 45854a02e8e25704d54f7475566ebfdfd2fcdacc (patch) | |
tree | ccf72a32db9468c5c641285a29dd1d55186f910a /nixos/modules/services | |
parent | 520db3b907243e427982988b7ca3c75b1d65dc81 (diff) | |
parent | 2548fd6908d38cee7a80d99b0dd68e26935e8df5 (diff) | |
download | nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar.gz nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar.bz2 nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar.lz nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar.xz nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.tar.zst nixlib-45854a02e8e25704d54f7475566ebfdfd2fcdacc.zip |
services/tahoe: SFTP support (#20372)
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/network-filesystems/tahoe.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index f1846b963252..f91827c379de 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -138,6 +138,45 @@ in ''; }; helper.enable = mkEnableOption "helper service"; + sftpd.enable = mkEnableOption "SFTP service"; + sftpd.port = mkOption { + default = null; + type = types.nullOr types.int; + description = '' + The port on which the SFTP server will listen. + + This is the correct setting to tweak if you want Tahoe's SFTP + daemon to listen on a different port. + ''; + }; + sftpd.hostPublicKeyFile = mkOption { + default = null; + type = types.nullOr types.path; + description = '' + Path to the SSH host public key. + ''; + }; + sftpd.hostPrivateKeyFile = mkOption { + default = null; + type = types.nullOr types.path; + description = '' + Path to the SSH host private key. + ''; + }; + sftpd.accounts.file = mkOption { + default = null; + type = types.nullOr types.path; + description = '' + Path to the accounts file. + ''; + }; + sftpd.accounts.url = mkOption { + default = null; + type = types.nullOr types.str; + description = '' + URL of the accounts server. + ''; + }; package = mkOption { default = pkgs.tahoelafs; defaultText = "pkgs.tahoelafs"; @@ -256,6 +295,19 @@ in [helper] enabled = ${if settings.helper.enable then "true" else "false"} + + [sftpd] + enabled = ${if settings.sftpd.enable then "true" else "false"} + ${optionalString (settings.sftpd.port != null) + "port = ${toString settings.sftpd.port}"} + ${optionalString (settings.sftpd.hostPublicKeyFile != null) + "host_pubkey_file = ${settings.sftpd.hostPublicKeyFile}"} + ${optionalString (settings.sftpd.hostPrivateKeyFile != null) + "host_privkey_file = ${settings.sftpd.hostPrivateKeyFile}"} + ${optionalString (settings.sftpd.accounts.file != null) + "accounts.file = ${settings.sftpd.accounts.file}"} + ${optionalString (settings.sftpd.accounts.url != null) + "accounts.url = ${settings.sftpd.accounts.url}"} ''; }); # Actually require Tahoe, so that we will have it installed. |