简化stable/unstable切换的方式;增加兼容性代码,根据版本引用
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
# 输入法配置模块
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
i18n.inputMethod = {
|
||||
i18n.inputMethod = (if lib.versionAtLeast config.home.stateVersion "25.05" then {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
} else {
|
||||
enabled = "fcitx5";
|
||||
}) // {
|
||||
fcitx5 = {
|
||||
addons = with pkgs; [
|
||||
fcitx5-gtk
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-nord
|
||||
];
|
||||
waylandFrontend = true; # available in home-manager-25.05
|
||||
};
|
||||
} // (lib.optionalAttrs (lib.versionAtLeast config.home.stateVersion "25.05") {
|
||||
waylandFrontend = true;
|
||||
});
|
||||
};
|
||||
|
||||
gtk = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user