mirror of
https://github.com/nix-community/nixos-vscode-server.git
synced 2026-08-24 02:34:13 -05:00
Accept a string or a list of strings
This commit is contained in:
@@ -140,14 +140,26 @@ This same list is also used to determine the `RPATH` when automatically patching
|
||||
```
|
||||
|
||||
### `installPath`
|
||||
The installation path for VS Code server is configurable and the default can differ for alternative builds (e.g. oss and insider), so this option allows you to configure which installation path should be monitered and automatically fixed. If you have multiple installations, you can specify them as an array.
|
||||
The installation path for VS Code server is configurable. You can specify either a single path as a string or multiple paths as a list. If you have multiple installations (e.g., stable, OSS, and insider builds), you can specify all of them to be monitored and automatically fixed.
|
||||
|
||||
```nix
|
||||
# Single path (string)
|
||||
{
|
||||
services.vscode-server.installPath = [ "$HOME/.vscode-server" "$HOME/.vscode-server-oss" ];
|
||||
services.vscode-server.installPath = "$HOME/.vscode-server";
|
||||
}
|
||||
|
||||
# Multiple paths (list)
|
||||
{
|
||||
services.vscode-server.installPath = [
|
||||
"$HOME/.vscode-server"
|
||||
"$HOME/.vscode-server-oss"
|
||||
"$HOME/.vscode-server-insiders"
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
String values are automatically coerced to a single-element list for backwards compatibility.
|
||||
|
||||
### `postPatch`
|
||||
The goal of this project is to make VS Code server work with NixOS, anything more is outside of the scope of the project, but if you want additional things to be done, you can use this hook to run a shell script after the patching is done.
|
||||
|
||||
|
||||
@@ -33,11 +33,13 @@ moduleConfig: {
|
||||
};
|
||||
|
||||
installPath = mkOption {
|
||||
type = listOf str;
|
||||
type = lib.types.coercedTo str (x: [x]) (listOf str);
|
||||
default = [ "$HOME/.vscode-server" ];
|
||||
example = [ "$HOME/.vscode-server" "$HOME/.vscode-server-oss" "$HOME/.vscode-server-insiders" ];
|
||||
description = ''
|
||||
The install paths for VS Code Server.
|
||||
Path(s) where VS Code Server will be installed.
|
||||
Accepts either a single path string or a list of paths.
|
||||
String values are automatically coerced to a single-element list for backwards compatibility.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
enableFHS ? false,
|
||||
nodejsPackage ? null,
|
||||
extraRuntimeDependencies ? [ ],
|
||||
installPath ? "$HOME/.vscode-server",
|
||||
installPath ? [ "$HOME/.vscode-server" ],
|
||||
postPatch ? "",
|
||||
}: let
|
||||
inherit (lib) makeBinPath makeLibraryPath optionalString;
|
||||
|
||||
Reference in New Issue
Block a user