From 003e6770af4af1e4a49112ecb0ce63c7595f548e Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 4 May 2025 17:54:32 +0100 Subject: [PATCH] =?UTF-8?q?nixvim:=20move=20standalone-mode=20docs=20from?= =?UTF-8?q?=20configuration=20=E2=86=92=20nixvim=20readme=20(#1219)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Link: https://github.com/danth/stylix/pull/1219 Reviewed-by: awwpotato Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com> --- docs/src/configuration.md | 33 +++++---------------------------- modules/nixvim/README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/docs/src/configuration.md b/docs/src/configuration.md index c55bcfa7..76c78bdb 100644 --- a/docs/src/configuration.md +++ b/docs/src/configuration.md @@ -195,35 +195,12 @@ to customize this. ## 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 +See [Modules → NixVim → Standalone Mode](./options/modules/nixvim.md#standalone-mode). ## Turning targets on and off diff --git a/modules/nixvim/README.md b/modules/nixvim/README.md index 2b03cc74..e1169e6e 100644 --- a/modules/nixvim/README.md +++ b/modules/nixvim/README.md @@ -12,6 +12,35 @@ This module themes [Neovim] using the options provided by [NixVim]. > Ensure you are configuring this module on the same platform (NixOS, Home > Manager, Darwin) as where you installed Nixvim. +## Standalone Mode + +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 ]; +} +``` + ## Related modules @@ -22,4 +51,5 @@ This module themes [Neovim] using the options provided by [NixVim]. [Neovim]: https://neovim.io [NixVim]: https://github.com/nix-community/nixvim#readme +[NixVim Standalone]: https://nix-community.github.io/nixvim/user-guide/install.html#standalone-usage [nvf]: https://github.com/NotAShelf/nvf#readme