docs: document configuring Standalone Nixvim

This commit is contained in:
Matt Sturgeon 2025-01-28 20:22:14 +00:00
parent 0a4755b656
commit eab1ecf41f
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -199,6 +199,35 @@ to customize this.
> Similarly, [`stylix.override`](options/global/nixos.md#stylixoverride) is not inherited
> if the color scheme is different.
## Standalone Nixvim
When using a NixOS or home-manager installation of [Nixvim], you can use Stylix
as normal. However, when using Nixvim's ["standalone" configuration mode][Nixvim Standalone],
you will need to pass Stylix's generated config to Nixvim yourself.
The generated config can be accessed as `config.lib.stylix.nixvim.config`. You
can use this as a module in your standalone Nixvim Configuration or an
extension of it.
For example:
```nix
{ inputs, config, pkgs, ... }:
let
inherit (pkgs.stdenv.hostPlatform) system;
nixvim-package = inputs.nixvim-config.packages.${system}.default;
extended-nixvim = nixvim-package.extend config.lib.stylix.nixvim.config;
in
{
environment.systemPackages = [
extended-nixvim
];
}
```
[Nixvim]: https://nix-community.github.io/nixvim
[Nixvim Standalone]: https://nix-community.github.io/nixvim/user-guide/install.html#standalone-usage
## Turning targets on and off
A target is anything which can have colors, fonts or a wallpaper applied to it.