add openvscode-server module
This commit is contained in:
parent
8fbeab3598
commit
635197ff8a
1 changed files with 41 additions and 0 deletions
41
nix/home-manager/programs/openvscode-server.nix
Normal file
41
nix/home-manager/programs/openvscode-server.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
pkgs,
|
||||
nodeFlake,
|
||||
repoFlake,
|
||||
...
|
||||
}: let
|
||||
pkgsUnstable = import nodeFlake.inputs.nixpkgs-unstable {inherit (pkgs) system config;};
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium {inherit (pkgs) system config;};
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.nil
|
||||
pkgs.nixd
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.alejandra
|
||||
pkgs.nixfmt
|
||||
|
||||
# TODO: automate linking this
|
||||
# 1. get the commit with: `codium --version`
|
||||
# 2. create the binary directory: `mkdir -p /home/steveej/.vscodium-server/bin/c8ce3ba4bc6b30b3b10edc61481cb85b1d2396bc/bin/`
|
||||
# 3. link the binary. this relies on the client-side setting `"remote.SSH.experimental.serverBinaryName": "openvscode-server"` : ln -s $(which openvscode-server) /home/steveej/.vscodium-server/bin/c8ce3ba4bc6b30b3b10edc61481cb85b1d2396bc/bin/
|
||||
|
||||
/*
|
||||
e.g.:
|
||||
```
|
||||
(
|
||||
set -e
|
||||
export COMMIT=$(codium --version | rg '^[0-9a-f]{40}$')
|
||||
ssh bm-hostkey0 "pkill -9 openvscode; rm -rf /home/steveej/.vscodium-server/bin/$COMMIT; mkdir -p /home/steveej/.vscodium-server/bin/$COMMIT/bin/; ln -s \$(which openvscode-server) /home/steveej/.vscodium-server/bin/$COMMIT/bin/"
|
||||
)
|
||||
```
|
||||
*/
|
||||
|
||||
(pkgsVscodium.openvscode-server.overrideAttrs (attrs: {
|
||||
src = repoFlake.inputs.openvscode-server;
|
||||
version = "1.88.1";
|
||||
yarnCache = attrs.yarnCache.overrideAttrs (_: {outputHash = "sha256-89c6GYLT2RzHqwxBKegYqB6g5rEJ6/nH53cnfV7b0Ts=";});
|
||||
}))
|
||||
|
||||
pkgs.waypipe
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue