Merge pull request #301 from DarkKirb/add-vscode-server

add vscode-server
This commit is contained in:
Charlotte 🦝 Delenk 2023-12-07 19:57:40 +01:00 committed by GitHub
commit 3130072a9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 16 deletions

View file

@ -2,6 +2,7 @@
pkgs,
nixpkgs,
lib,
nixos-vscode-server,
...
}: let
x86_64-linux-pkgs = import nixpkgs {
@ -9,25 +10,13 @@
config.allowUnfree = true;
};
in {
home.activation.vscode-server = lib.hm.dag.entryAfter ["write-boundary"] ''
if test -f ~/.vscode-server; then
if test -f "~/.vscode/extensions"; then
if ! test -L "~/.vscode-server/extensions"; then
$DRY_RUN_CMD ln -s $VERBOSE_ARG ~/.vscode/extensions ~/.vscode-server/
fi
fi
if test -f "~/vscode-server/bin"; then
for f in ~/.vscode-server/bin/*/node; do
if ! test -L $f; then
$DRY_RUN_CMD ln -sf $VERBOSE_ARG ${pkgs.nodejs}/bin/node $f
fi
done
fi
fi
'';
imports = [
"${nixos-vscode-server}/modules/vscode-server/home.nix"
];
programs.vscode = {
enable = true;
extensions = with x86_64-linux-pkgs.vscode-extensions; [
];
};
services.vscode-server.enable = true;
}

View file

@ -606,6 +606,29 @@
"type": "github"
}
},
"nixos-vscode-server": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1684517665,
"narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1670461440,
@ -689,6 +712,7 @@
"nix-neovim": "nix-neovim",
"nix-packages": "nix-packages",
"nixos-hardware": "nixos-hardware",
"nixos-vscode-server": "nixos-vscode-server",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"sops-nix": "sops-nix",

View file

@ -94,6 +94,11 @@ rec {
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixos-vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs";
nur.url = "github:nix-community/NUR";
sops-nix = {