about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorChristian Kögler <ck3d@gmx.de>2022-10-01 10:15:32 +0200
committerGitHub <noreply@github.com>2022-10-01 10:15:32 +0200
commit95de45977833ef6748b89d22cc0f550ce06ae452 (patch)
tree2813b477921944abeff298142da6448a25b909f6 /nixos
parent9a71d7d1f56beba7ce70878310f9c47d33e9a19b (diff)
parentd9de5da65bc29859f71c657bbee85021c008e5dc (diff)
downloadnixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar.gz
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar.bz2
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar.lz
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar.xz
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.tar.zst
nixlib-95de45977833ef6748b89d22cc0f550ce06ae452.zip
Merge pull request #191963 from pbsds/code-remote-module
nixos/code-server: escape shell extraArguments
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-apps/code-server.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/code-server.nix b/nixos/modules/services/web-apps/code-server.nix
index 1191fb53350b..0d6b6c529b6d 100644
--- a/nixos/modules/services/web-apps/code-server.nix
+++ b/nixos/modules/services/web-apps/code-server.nix
@@ -63,7 +63,7 @@ in {
       hashedPassword = mkOption {
         default = "";
         description =
-          lib.mdDoc "Create the password with: 'echo -n 'thisismypassword' | npx argon2-cli -e'.";
+          lib.mdDoc "Create the password with: `echo -n 'thisismypassword' | npx argon2-cli -e`.";
         type = types.str;
       };
 
@@ -109,7 +109,7 @@ in {
         HASHED_PASSWORD = cfg.hashedPassword;
       } // cfg.extraEnvironment;
       serviceConfig = {
-        ExecStart = "${cfg.package}/bin/code-server --bind-addr ${cfg.host}:${toString cfg.port} --auth ${cfg.auth} " + builtins.concatStringsSep " " cfg.extraArguments;
+        ExecStart = "${cfg.package}/bin/code-server --bind-addr ${cfg.host}:${toString cfg.port} --auth ${cfg.auth} " + lib.escapeShellArgs cfg.extraArguments;
         ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
         RuntimeDirectory = cfg.user;
         User = cfg.user;