From d9de5da65bc29859f71c657bbee85021c008e5dc Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 19 Sep 2022 22:20:48 +0200 Subject: [PATCH] nixos/code-server: escape shell extraArguments --- nixos/modules/services/web-apps/code-server.nix | 4 ++-- 1 file 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;