Skip to content

Commit

Permalink
docs: document configuring Standalone Nixvim
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 28, 2025
1 parent 7ff675e commit 7401189
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,35 @@ to customize this.
> Similarly, [`stylix.override`](options/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

In Stylix terms, a target is anything which can have colors, fonts or a
Expand Down

0 comments on commit 7401189

Please sign in to comment.