简化stable/unstable切换的方式;增加兼容性代码,根据版本引用

This commit is contained in:
2025-05-05 18:59:34 +08:00
parent e6891f9f8e
commit c133e5637f
12 changed files with 113 additions and 93 deletions

View File

@@ -1,25 +1,28 @@
{ config, pkgs, libs, ... }:
{ config, pkgs, lib, libs, ... }:
let
extensions = with pkgs.vscode-extensions; [
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
];
in
{
imports = [
];
programs = {
vscode = {
enable = true;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
];
};
};
} // (if lib.versionAtLeast config.home.stateVersion "25.05" then {
profiles.default = { inherit extensions; };
} else {
inherit extensions;
});
};
xdg.configFile = {