nixos/code-server: escape shell extraArguments
This commit is contained in:
parent
d9a1414346
commit
d9de5da65b
|
@ -63,7 +63,7 @@ in {
|
||||||
hashedPassword = mkOption {
|
hashedPassword = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
description =
|
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;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ in {
|
||||||
HASHED_PASSWORD = cfg.hashedPassword;
|
HASHED_PASSWORD = cfg.hashedPassword;
|
||||||
} // cfg.extraEnvironment;
|
} // cfg.extraEnvironment;
|
||||||
serviceConfig = {
|
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";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
RuntimeDirectory = cfg.user;
|
RuntimeDirectory = cfg.user;
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
|
|
Loading…
Reference in a new issue