about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-06-13 17:55:46 +0200
committerGitHub <noreply@github.com>2023-06-13 17:55:46 +0200
commit4ab538636f64f624c49cef4393d1a0d4ebf12a66 (patch)
treef4d6c5754ead962add9f428b947846cd0211ff71 /nixos
parent8594a8e1e96d3135fa29b234743ee50c72aae2a1 (diff)
parent9ce1accb88516a426a52853bfb6756ba86c835f7 (diff)
downloadnixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar.gz
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar.bz2
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar.lz
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar.xz
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.tar.zst
nixlib-4ab538636f64f624c49cef4393d1a0d4ebf12a66.zip
Merge pull request #237545 from drupol/openvscode-server/bump-june-2023
openvscode-server: 1.78.2 -> 1.79.0
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-apps/openvscode-server.nix41
1 files changed, 21 insertions, 20 deletions
diff --git a/nixos/modules/services/web-apps/openvscode-server.nix b/nixos/modules/services/web-apps/openvscode-server.nix
index d0db614d8d72..3daf238c57e1 100644
--- a/nixos/modules/services/web-apps/openvscode-server.nix
+++ b/nixos/modules/services/web-apps/openvscode-server.nix
@@ -4,7 +4,8 @@ let
   cfg = config.services.openvscode-server;
   defaultUser = "openvscode-server";
   defaultGroup = defaultUser;
-in {
+in
+{
   options = {
     services.openvscode-server = {
       enable = lib.mkEnableOption (lib.mdDoc "openvscode-server");
@@ -126,12 +127,12 @@ in {
       };
 
       telemetryLevel = lib.mkOption {
-        default = "off";
+        default = null;
         example = "crash";
         description = lib.mdDoc ''
           Sets the initial telemetry level. Valid levels are: 'off', 'crash', 'error' and 'all'.
         '';
-        type = lib.types.str;
+        type = lib.types.nullOr (lib.types.enum [ "off" "crash" "error" "all" ]);
       };
 
       connectionToken = lib.mkOption {
@@ -167,23 +168,23 @@ in {
             --accept-server-license-terms \
             --host=${cfg.host} \
             --port=${toString cfg.port} \
-          '' + lib.optionalString (cfg.telemetryLevel == true) ''
-            --telemetry-level=${cfg.telemetryLevel} \
-          '' + lib.optionalString (cfg.withoutConnectionToken == true) ''
-            --without-connection-token \
-          '' + lib.optionalString (cfg.socketPath != null) ''
-            --socket-path=${cfg.socketPath} \
-          '' + lib.optionalString (cfg.userDataDir != null) ''
-            --user-data-dir=${cfg.userDataDir} \
-          '' + lib.optionalString (cfg.serverDataDir != null) ''
-            --server-data-dir=${cfg.serverDataDir} \
-          '' + lib.optionalString (cfg.extensionsDir != null) ''
-            --extensions-dir=${cfg.extensionsDir} \
-          '' + lib.optionalString (cfg.connectionToken != null) ''
-            --connection-token=${cfg.connectionToken} \
-          '' + lib.optionalString (cfg.connectionTokenFile != null) ''
-            --connection-token-file=${cfg.connectionTokenFile} \
-          '' + lib.escapeShellArgs cfg.extraArguments;
+        '' + lib.optionalString (cfg.telemetryLevel != null) ''
+          --telemetry-level=${cfg.telemetryLevel} \
+        '' + lib.optionalString (cfg.withoutConnectionToken) ''
+          --without-connection-token \
+        '' + lib.optionalString (cfg.socketPath != null) ''
+          --socket-path=${cfg.socketPath} \
+        '' + lib.optionalString (cfg.userDataDir != null) ''
+          --user-data-dir=${cfg.userDataDir} \
+        '' + lib.optionalString (cfg.serverDataDir != null) ''
+          --server-data-dir=${cfg.serverDataDir} \
+        '' + lib.optionalString (cfg.extensionsDir != null) ''
+          --extensions-dir=${cfg.extensionsDir} \
+        '' + lib.optionalString (cfg.connectionToken != null) ''
+          --connection-token=${cfg.connectionToken} \
+        '' + lib.optionalString (cfg.connectionTokenFile != null) ''
+          --connection-token-file=${cfg.connectionTokenFile} \
+        '' + lib.escapeShellArgs cfg.extraArguments;
         ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
         RuntimeDirectory = cfg.user;
         User = cfg.user;