feat(vscode): inline nix4vscode call
This commit is contained in:
parent
27c6c4f9fa
commit
7c08a002cf
4 changed files with 41 additions and 93 deletions
|
@ -83,7 +83,6 @@
|
|||
screen
|
||||
|
||||
inputs'.nixpkgs-kanidm.legacyPackages.kanidm
|
||||
inputs'.nix4vscode.packages.default
|
||||
];
|
||||
|
||||
# Set Environment Variables
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ pkgs, repoFlake, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
repoFlake,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium { inherit (pkgs) system config; };
|
||||
in
|
||||
|
@ -48,19 +54,43 @@ in
|
|||
|
||||
golang.go
|
||||
jeff-hykin.better-go-syntax
|
||||
|
||||
ibecker.treefmt-vscode
|
||||
]
|
||||
)
|
||||
)
|
||||
++ [
|
||||
(pkgsVscodium.vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "markdown-oxide";
|
||||
publisher = "felixzeller";
|
||||
version = "1.1.0";
|
||||
sha256 = "07l37hkg106m3nl9530l7i39iw1kibckv1zi4n23gbp7srdrwbs3";
|
||||
})
|
||||
++ (
|
||||
let
|
||||
nix4vscodeConfig = pkgs.writeText "nix4vscode.toml" ''
|
||||
vscode_version = "${config.programs.vscode.package.version}"
|
||||
|
||||
[[extensions]]
|
||||
publisher_name = "FelixZeller"
|
||||
extension_name = "markdown-oxide"
|
||||
|
||||
[[extensions]]
|
||||
publisher_name = "ibecker"
|
||||
extension_name = "treefmt-vscode"
|
||||
'';
|
||||
nix4vscode =
|
||||
pkgs.runCommand "nix4vscode.nix"
|
||||
{
|
||||
__noChroot = true;
|
||||
nativeBuildInputs = [ repoFlake.inputs.nix4vscode.packages.${pkgs.stdenv.system}.default ];
|
||||
}
|
||||
''
|
||||
export RUST_BACKTRACE=full
|
||||
export HOME=$(mktemp -d)
|
||||
nix4vscode ${nix4vscodeConfig} > $out
|
||||
'';
|
||||
nix4vscodeExtensions = builtins.removeAttrs (pkgs.callPackage nix4vscode { }) [
|
||||
"override"
|
||||
"overrideDerivation"
|
||||
];
|
||||
nix4vscodeExtensions' = lib.attrsets.mapAttrsToList (
|
||||
_: v: builtins.head (builtins.attrValues v)
|
||||
) nix4vscodeExtensions;
|
||||
in
|
||||
nix4vscodeExtensions'
|
||||
);
|
||||
mutableExtensionsDir = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
vscode_version = "1.94.2"
|
||||
|
||||
[[extensions]]
|
||||
publisher_name = "FelixZeller"
|
||||
extension_name = "markdown-oxide"
|
||||
|
||||
[[extensions]]
|
||||
publisher_name = "ibecker"
|
||||
extension_name = "treefmt-vscode"
|
|
@ -1,72 +0,0 @@
|
|||
{ pkgs, lib }:
|
||||
let
|
||||
inherit (pkgs.stdenv)
|
||||
isDarwin
|
||||
isLinux
|
||||
isi686
|
||||
isx86_64
|
||||
isAarch32
|
||||
isAarch64
|
||||
;
|
||||
inherit (pkgs) vscode-utils;
|
||||
merge = lib.attrsets.recursiveUpdate;
|
||||
in
|
||||
merge
|
||||
(merge
|
||||
(merge
|
||||
(merge
|
||||
{
|
||||
"felixzeller"."markdown-oxide" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "markdown-oxide";
|
||||
publisher = "felixzeller";
|
||||
version = "1.1.0";
|
||||
sha256 = "07l37hkg106m3nl9530l7i39iw1kibckv1zi4n23gbp7srdrwbs3";
|
||||
};
|
||||
}
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isLinux && (isi686 || isx86_64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1r17wjpw8xiha5r9h3146facxghpcp416zf8551sw93cmam9ky6j";
|
||||
arch = "linux-x64";
|
||||
};
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isLinux && (isAarch32 || isAarch64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "0swvl7fkjcwp43grnrhnmy60a5m3hfwawk204byi8hhbczy131li";
|
||||
arch = "linux-arm64";
|
||||
};
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isDarwin && (isi686 || isx86_64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1swq9hy6a9nzkrn07j21g59pyk2m7aqsfi1pphl9l9y8p4zwiaqm";
|
||||
arch = "darwin-x64";
|
||||
};
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isDarwin && (isAarch32 || isAarch64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1xg3wnn3f1kvsz5a09l0cjpzfm3l9va73cahbvl14mx3n6734r2m";
|
||||
arch = "darwin-arm64";
|
||||
};
|
||||
}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue