Fix VSCode module 👽

This commit is contained in:
Daniel Thwaites 2023-04-19 09:33:49 +01:00
parent 7e70eedc49
commit 936d97a057
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D
2 changed files with 25 additions and 23 deletions

View file

@ -6,30 +6,14 @@ let
extension = ".json";
};
themePackageJson = pkgs.writeText "package.json" (builtins.toJSON {
name = "stylix";
displayName = "Stylix";
description = "Theme configured as part of your NixOS configuration.";
themeExtension = pkgs.runCommandLocal "stylix-vscode" {
vscodeExtUniqueId = "stylix.stylix";
vscodeExtPublisher = "stylix";
version = "0.0.0";
publisher = "Stylix";
engines.vscode = "^1.43.0";
categories = [ "Themes" ];
contributes.themes = [{
label = "Stylix";
uiTheme = "vs";
path = "./themes/stylix.json";
}];
"__metadata" = {
id = "6f0404ee-0463-4def-80f1-515adc5389fc";
publisherDisplayName = "Stylix";
publisherId = "b78a1e2c-a0b3-413a-8196-1b3e8ca3865b";
};
});
themeExtension = pkgs.runCommandLocal "stylix-vscode" {} ''
mkdir -p $out/share/vscode/extensions/stylix/themes
ln -s ${themePackageJson} $out/share/vscode/extensions/stylix/package.json
ln -s ${themeFile} $out/share/vscode/extensions/stylix/themes/stylix.json
} ''
mkdir -p "$out/share/vscode/extensions/$vscodeExtUniqueId/themes"
ln -s ${./package.json} "$out/share/vscode/extensions/$vscodeExtUniqueId/package.json"
ln -s ${themeFile} "$out/share/vscode/extensions/$vscodeExtUniqueId/themes/stylix.json"
'';
in {

View file

@ -0,0 +1,18 @@
{
"name": "stylix",
"displayName": "Stylix",
"version": "0.0.0",
"publisher": "stylix",
"description": "Theme configured via NixOS or Home Manager.",
"categories": [ "Themes" ],
"engines": {
"vscode": "^1.43.0"
},
"contributes": {
"themes": [{
"label": "Stylix",
"uiTheme": "vs",
"path": "./themes/stylix.json"
}]
}
}