Kitty/zh-cn: Difference between revisions
Created page with "这将提供一个可用 Kitty 的 shell,而无需将其添加到系统配置中。" |
Created page with "{{Expansion|reason=此章节不完整,需要详细的故障排除步骤}}" |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 16: | Line 16: | ||
==== System setup ==== | ==== System setup ==== | ||
要安装 Kitty,可将其添加到系统级的 <code>/etc/nixos/configuration.nix</code> 中的 <code>environment.systemPackages</code>,或添加到用户级的 <code>~/.config/nixpkgs/home.nix</code> 中的 <code>home.packages</code>。<ref>https://nixos.org/manual/nixos/stable/</ref> | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
# System-wide installation (in /etc/nixos/configuration.nix) | # System-wide installation (in /etc/nixos/configuration.nix) | ||
| Line 31: | Line 29: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
然后,重建系统或应用 Home Manager 配置: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# For system-wide installation | # For system-wide installation | ||
| Line 47: | Line 43: | ||
==== Basic ==== | ==== Basic ==== | ||
NixOS 并未为 Kitty 提供原生模块。要在 NixOS 上进行基本的 Kitty 配置,您需要手动参照 Kitty 文档中的步骤进行。 | |||
NixOS | |||
如果您正在使用 Home Manager,可以通过一个简单的配置启用 Kitty: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
programs.kitty.enable = true; | programs.kitty.enable = true; | ||
| Line 60: | Line 52: | ||
==== Advanced ==== | ==== Advanced ==== | ||
对于更高级的 Home Manager 配置,您可以指定各种 Kitty 设置: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
programs.kitty = lib.mkForce { | programs.kitty = lib.mkForce { | ||
| Line 103: | Line 93: | ||
== Tips and tricks == | == Tips and tricks == | ||
< | <span id="Theming_with_Stylix"></span> | ||
=== | === 使用 Stylix 进行主题化 === | ||
您可以使用 Stylix 通过启用其内置集成来为 Kitty 设置主题: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
stylix.targets.kitty.enable = true; | stylix.targets.kitty.enable = true; | ||
| Line 116: | Line 103: | ||
== Troubleshooting == | == Troubleshooting == | ||
{{Expansion|reason=此章节不完整,需要详细的故障排除步骤}} | |||
{{Expansion|reason= | |||
== References == | == References == | ||