diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-06-12 21:35:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-12 21:35:04 +0200 |
commit | 3d6416cc203d9caca579bbc6d400fa56fd53b8da (patch) | |
tree | 74027bda811314627dd23d5d2e75597f9cf20180 /nixos | |
parent | 88f636089a3a778e503710f9b2f21c1229775d67 (diff) | |
parent | 706ce9e2308ac370088abb09cf63b20cce2b07cf (diff) | |
download | nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar.gz nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar.bz2 nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar.lz nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar.xz nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.tar.zst nixlib-3d6416cc203d9caca579bbc6d400fa56fd53b8da.zip |
nixos/synergy: add encryption support to server (#125002)
Co-authored-by: Joshua Trees <me@jtrees.io>
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/synergy.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix index 7990a9f6f4ce..d6cd5d7f0d66 100644 --- a/nixos/modules/services/misc/synergy.nix +++ b/nixos/modules/services/misc/synergy.nix @@ -70,6 +70,26 @@ in type = types.bool; description = "Whether the Synergy server should be started automatically."; }; + tls = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether TLS encryption should be used. + + Using this requires a TLS certificate that can be + generated by starting the Synergy GUI once and entering + a valid product key. + ''; + }; + + cert = mkOption { + type = types.nullOr types.str; + default = null; + example = "~/.synergy/SSL/Synergy.pem"; + description = "The TLS certificate to use for encryption."; + }; + }; }; }; @@ -95,7 +115,7 @@ in description = "Synergy server"; wantedBy = optional cfgS.autoStart "graphical-session.target"; path = [ pkgs.synergy ]; - serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f ${optionalString (cfgS.address != "") "-a ${cfgS.address}"} ${optionalString (cfgS.screenName != "") "-n ${cfgS.screenName}" }''; + serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f${optionalString (cfgS.address != "") " -a ${cfgS.address}"}${optionalString (cfgS.screenName != "") " -n ${cfgS.screenName}"}${optionalString cfgS.tls.enable " --enable-crypto"}${optionalString (cfgS.tls.cert != null) (" --tls-cert=${cfgS.tls.cert}")}''; serviceConfig.Restart = "on-failure"; }; }) |