diff options
author | Peter Hoeg <peter@hoeg.com> | 2018-10-14 18:47:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-14 18:47:51 +0800 |
commit | abe0e22e205ce19edc9623aa38628a8f751db73c (patch) | |
tree | b55eccfb548cf901a16402927bbd859a6b449a04 /nixos/modules/services/networking | |
parent | 6d3b54a1e99ff7283f003d1736b0f258d9307a15 (diff) | |
parent | d2e1dd7fc715c675f2ba774a5b6174860d2a2b41 (diff) | |
download | nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar.gz nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar.bz2 nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar.lz nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar.xz nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.tar.zst nixlib-abe0e22e205ce19edc9623aa38628a8f751db73c.zip |
Merge pull request #48119 from mrVanDalo/update_syncthing
nixos/modules: services.syncthing add guiAddress parameter
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/syncthing.nix | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index c610b3b66606..fd31b2a67687 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -16,6 +16,14 @@ in { available on http://127.0.0.1:8384/. ''; + guiAddress = mkOption { + type = types.str; + default = "127.0.0.1:8384"; + description = '' + Address to serve the GUI. + ''; + }; + systemService = mkOption { type = types.bool; default = true; @@ -23,7 +31,7 @@ in { }; user = mkOption { - type = types.string; + type = types.str; default = defaultUser; description = '' Syncthing will be run under this user (user will be created if it doesn't exist. @@ -32,7 +40,7 @@ in { }; group = mkOption { - type = types.string; + type = types.str; default = "nogroup"; description = '' Syncthing will be run under this group (group will not be created if it doesn't exist. @@ -41,7 +49,7 @@ in { }; all_proxy = mkOption { - type = types.nullOr types.string; + type = with types; nullOr str; default = null; example = "socks5://address.com:1234"; description = '' @@ -132,7 +140,12 @@ in { User = cfg.user; Group = cfg.group; PermissionsStartOnly = true; - ExecStart = "${cfg.package}/bin/syncthing -no-browser -home=${cfg.dataDir}"; + ExecStart = '' + ${cfg.package}/bin/syncthing \ + -no-browser \ + -gui-address=${cfg.guiAddress} \ + -home=${cfg.dataDir} + ''; }; }; |