From dd9ec124a25383f4ea9eb7d000de26a842fa13df Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 29 Dec 2022 17:34:47 +0000 Subject: [PATCH] docs: fix documentation generation --- .circleci/config.yml | 2 +- docs.nix | 35 ++++++ docs/default.nix | 48 -------- docs/man-nixvim.xml | 27 ----- docs/man-pages.xml | 11 -- docs/manual.xml | 23 ---- docs/plugins.md | 29 ----- docs/plugins/colorschemes/base16.md | 155 ------------------------ docs/plugins/colorschemes/gruvbox.md | 144 ---------------------- docs/plugins/colorschemes/one.md | 6 - docs/plugins/colorschemes/onedark.md | 6 - docs/plugins/colorschemes/tokyonight.md | 70 ----------- docs/plugins/git/fugitive.md | 0 docs/plugins/git/gitgutter.md | 0 docs/plugins/languages/ledger.md | 0 docs/plugins/languages/nix.md | 0 docs/plugins/languages/treesitter.md | 0 docs/plugins/languages/zig.md | 0 docs/plugins/nvim-lsp/clangd.md | 0 docs/plugins/nvim-lsp/default.md | 0 docs/plugins/nvim-lsp/lspsaga.md | 0 docs/plugins/nvim-lsp/rnix-lsp.md | 0 docs/plugins/nvim-lsp/rust-analyzer.md | 0 docs/plugins/pluginmanagers/packer.md | 0 docs/plugins/statuslines/airline.md | 0 docs/plugins/statuslines/lightline.md | 0 docs/plugins/utils/barbar.md | 0 docs/plugins/utils/commentary.md | 0 docs/plugins/utils/endwise.md | 0 docs/plugins/utils/goyo.md | 0 docs/plugins/utils/nvim-autopairs.md | 0 docs/plugins/utils/startify.md | 0 docs/plugins/utils/telescope.md | 0 docs/plugins/utils/undotree.md | 0 flake.lock | 19 +-- flake.nix | 14 +-- modules/highlights.nix | 5 +- modules/keymaps.nix | 4 +- modules/options.nix | 5 +- plugins/colorschemes/base16.nix | 1 + plugins/colorschemes/tokyonight.nix | 3 +- 41 files changed, 55 insertions(+), 552 deletions(-) create mode 100644 docs.nix delete mode 100644 docs/default.nix delete mode 100644 docs/man-nixvim.xml delete mode 100644 docs/man-pages.xml delete mode 100644 docs/manual.xml delete mode 100644 docs/plugins.md delete mode 100644 docs/plugins/colorschemes/base16.md delete mode 100644 docs/plugins/colorschemes/gruvbox.md delete mode 100644 docs/plugins/colorschemes/one.md delete mode 100644 docs/plugins/colorschemes/onedark.md delete mode 100644 docs/plugins/colorschemes/tokyonight.md delete mode 100644 docs/plugins/git/fugitive.md delete mode 100644 docs/plugins/git/gitgutter.md delete mode 100644 docs/plugins/languages/ledger.md delete mode 100644 docs/plugins/languages/nix.md delete mode 100644 docs/plugins/languages/treesitter.md delete mode 100644 docs/plugins/languages/zig.md delete mode 100644 docs/plugins/nvim-lsp/clangd.md delete mode 100644 docs/plugins/nvim-lsp/default.md delete mode 100644 docs/plugins/nvim-lsp/lspsaga.md delete mode 100644 docs/plugins/nvim-lsp/rnix-lsp.md delete mode 100644 docs/plugins/nvim-lsp/rust-analyzer.md delete mode 100644 docs/plugins/pluginmanagers/packer.md delete mode 100644 docs/plugins/statuslines/airline.md delete mode 100644 docs/plugins/statuslines/lightline.md delete mode 100644 docs/plugins/utils/barbar.md delete mode 100644 docs/plugins/utils/commentary.md delete mode 100644 docs/plugins/utils/endwise.md delete mode 100644 docs/plugins/utils/goyo.md delete mode 100644 docs/plugins/utils/nvim-autopairs.md delete mode 100644 docs/plugins/utils/startify.md delete mode 100644 docs/plugins/utils/telescope.md delete mode 100644 docs/plugins/utils/undotree.md diff --git a/.circleci/config.yml b/.circleci/config.yml index a5ff3b18d2..119e012cd6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,4 +56,4 @@ workflows: - build-docs filters: branches: - only: main \ No newline at end of file + only: main diff --git a/docs.nix b/docs.nix new file mode 100644 index 0000000000..4c27d66c49 --- /dev/null +++ b/docs.nix @@ -0,0 +1,35 @@ +{ pkgs, lib, modules, ... }: +let + options = lib.evalModules { + modules = modules; + specialArgs = { inherit pkgs lib; }; + }; + docs = pkgs.nixosOptionsDoc { + # If we don't do this, we end up with _module.args on the generated options, which we do not want + options = lib.filterAttrs (k: _: k != "_module") options.options; + warningsAreErrors = false; + }; + asciidoc = docs.optionsAsciiDoc; +in +pkgs.stdenv.mkDerivation { + name = "nixvim-docs"; + + src = asciidoc; + buildInputs = [ + pkgs.asciidoctor + ]; + + phases = [ "buildPhase" ]; + + buildPhase = '' + mkdir -p $out/share + cat < header.adoc + = NixVim options + This lists all the options available for NixVim. + :toc: + + EOF + cat header.adoc $src > tmp.adoc + asciidoctor tmp.adoc -o $out/share/index.html + ''; +} diff --git a/docs/default.nix b/docs/default.nix deleted file mode 100644 index 5601e5f64e..0000000000 --- a/docs/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ pkgs ? import { } -, lib ? import -, nmdSrc -, nixvimModules ? [ ] -, ... -}: -let - nmd = import nmdSrc { inherit pkgs lib; }; - scrubbedPkgsModule = { - imports = [{ - _module.args = { - pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs); - pkgs_i686 = lib.mkForce { }; - }; - }]; - }; - buildModulesDocs = args: - nmd.buildModulesDocs ({ - moduleRootPaths = [ ./.. ]; - mkModuleUrl = path: - "https://github.com/pta2002/nixvim/blob/main/${path}#blob-path"; - channelName = "nixvim"; - } // args); - nixvimDocs = buildModulesDocs { - modules = [ - scrubbedPkgsModule - ] ++ nixvimModules; - docBook.id = "nixvim-options"; - }; - - docs = nmd.buildDocBookDocs { - pathName = ""; - modulesDocs = [ nixvimDocs ]; - documentsDirectory = ./.; - documentType = "book"; - chunkToc = '' - - - - - - - ''; - }; -in -# TODO: Parse this json or something, since docbook isn't working (and it's kind of terrible anyway) -nixvimDocs.json - diff --git a/docs/man-nixvim.xml b/docs/man-nixvim.xml deleted file mode 100644 index de16280742..0000000000 --- a/docs/man-nixvim.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - nixvim.nix - 5 - NixVim - - - - nixvim.nix - NixVim configuration specification - - - Description - - TODO - - - - Options - - You can use the following options in your nixvim config - - - - diff --git a/docs/man-pages.xml b/docs/man-pages.xml deleted file mode 100644 index 9d4c1ce8d3..0000000000 --- a/docs/man-pages.xml +++ /dev/null @@ -1,11 +0,0 @@ - - NixVim Reference Pages - - NixVim contributors - 2021-2022NixVim contributors - - - - diff --git a/docs/manual.xml b/docs/manual.xml deleted file mode 100644 index 090643d3d9..0000000000 --- a/docs/manual.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - NixVim Manual - - - Preface - - This manual is meant to serve as the ultimate reference for how to use and install NixVim. - - - If you have any issues, questions, or plugin suggestions please open an issue on the - NixVim GitHub - - - - Configuration Options - - - diff --git a/docs/plugins.md b/docs/plugins.md deleted file mode 100644 index 954ca51274..0000000000 --- a/docs/plugins.md +++ /dev/null @@ -1,29 +0,0 @@ -# List of plugins for NixVim - -## Colorschemes -### Gruvbox - -Just set `enable` to use the colorscheme. - -```nix -programs.nixvim.colorscheme.gruvbox.enable = true; -``` - -## Status lines -### Lightline -Lightline is a small and customizable status line for vim. It can be enabled -with `programs.nixvim.plugins.lightline.enable`, and it will try to use the -colorscheme set by the user. If you want to manually override this, set -`programs.nixvim.plugins.lightline.colorscheme` to the name of the colorscheme -to use. - -```nix -programs.nixvim.plugins.lightline = { - enable = true; # Enable this plugin - - # This can be set to null to reset. Defaults to global colorscheme - colorscheme = "wombat"; - - # ... -}; -``` diff --git a/docs/plugins/colorschemes/base16.md b/docs/plugins/colorschemes/base16.md deleted file mode 100644 index 04ce344114..0000000000 --- a/docs/plugins/colorschemes/base16.md +++ /dev/null @@ -1,155 +0,0 @@ -# base16 -Base16 is a set of colorschemes, so it comes with several themes you can choose from: - - - 3024 - - apathy - - ashes - - atelier-cave-light - - atelier-cave - - atelier-dune-light - - atelier-dune - - atelier-estuary-light - - atelier-estuary - - atelier-forest-light - - atelier-forest - - atelier-heath-light - - atelier-heath - - atelier-lakeside-light - - atelier-lakeside - - atelier-plateau-light - - atelier-plateau - - atelier-savanna-light - - atelier-savanna - - atelier-seaside-light - - atelier-seaside - - atelier-sulphurpool-light - - atelier-sulphurpool - - atlas - - bespin - - black-metal-bathory - - black-metal-burzum - - black-metal-dark-funeral - - black-metal-gorgoroth - - black-metal-immortal - - black-metal-khold - - black-metal-marduk - - black-metal-mayhem - - black-metal-nile - - black-metal-venom - - black-metal - - brewer - - bright - - brogrammer - - brushtrees-dark - - brushtrees - - chalk - - circus - - classic-dark - - classic-light - - codeschool - - cupcake - - cupertino - - darktooth - - default-dark - - default-light - - dracula - - eighties - - embers - - flat - - fruit-soda - - github - - google-dark - - google-light - - grayscale-dark - - grayscale-light - - greenscreen - - gruvbox-dark-hard - - gruvbox-dark-medium - - gruvbox-dark-pale - - gruvbox-dark-soft - - gruvbox-light-hard - - gruvbox-light-medium - - gruvbox-light-soft - - harmonic-dark - - harmonic-light - - heetch-light - - heetch - - helios - - hopscotch - - horizon-dark - - ia-dark - - ia-light - - icy - - irblack - - isotope - - macintosh - - marrakesh - - material-darker - - material-lighter - - material-palenight - - material - - material-vivid - - materia - - mellow-purple - - mexico-light - - mocha - - monokai - - nord - - oceanicnext - - ocean - - onedark - - one-light - - outrun-dark - - papercolor-dark - - papercolor-light - - paraiso - - phd - - pico - - pop - - porple - - railscasts - - rebecca - - seti - - shapeshifter - - snazzy - - solarflare - - solarized-dark - - solarized-light - - spacemacs - - summerfruit-dark - - summerfruit-light - - synth-midnight-dark - - tomorrow-night-eighties - - tomorrow-night - - tomorrow - - tube - - twilight - - unikitty-dark - - unikitty-light - - woodland - - xcode-dusk - - zenburn - -More information can be found on the official base16 website, [here](http://chriskempson.com/projects/base16/). - -## Options - -### `colorschemes.base16.enable` -**Description**: Enables base16 - -**Type**: `bool` - -### `colorschemes.base16.useTruecolor` -**Description**: Whether to use truecolor for the colorschemes. If set to -false, you'll need to set up base16 in your shell. - -**Type**: `bool` - -**Default**: `true` - -### `colorschemes.base16.setUpBar` -**Description**: Whether to install the matching plugin for your statusbar. This does nothing as of yet, waiting for upstream support. - -**Type**: `bool` - -**Default**: `true` diff --git a/docs/plugins/colorschemes/gruvbox.md b/docs/plugins/colorschemes/gruvbox.md deleted file mode 100644 index b7e8880e02..0000000000 --- a/docs/plugins/colorschemes/gruvbox.md +++ /dev/null @@ -1,144 +0,0 @@ -# gruvbox -This plugin sets up the `gruvbox` colorscheme. - -## Options -### `colorschemes.gruvbox.enable` -**Description**: Enable gruvbox - -**Type**: `bool` - -### `colorschemes.gruvbox.italics` -**Description**: Enable italics - -**Type**: `bool` - -### `colorschemes.gruvbox.bold` -**Description**: Enable bold - -**Type**: `bool` - -### `colorschemes.gruvbox.underline` -**Description**: Enable underlined text - -**Type**: `bool` - -### `colorschemes.gruvbox.undercurl` -**Description**: Enable undercurled text - -**Type**: `bool` - -### `colorschemes.gruvbox.contrastDark` -**Description**: Contrast for the dark mode - -**Type**: `nullOr (enum [ "soft" "medium" "hard" ])` - -**Default**: `null` - -### `colorschemes.gruvbox.contrastLight` -**Type**: `nullOr (enum [ "soft" "medium" "hard" ])` - -**Default**: `null` - -**Description**: "Contrast for the light mode"; - -### `colorschemes.gruvbox.highlightSearchCursor` -**Type**: `nullOr colors` - -**Default**: `null` - -**Description**: "The cursor background while search is highlighted"; - -### `colorschemes.gruvbox.numberColumn` -**Description**: The number column background - -**Type**: `nullOr colors` - -**Default**: `null` - -### `colorschemes.gruvbox.signColumn` -**Description**: "The sign column background"; - -**Type**: `nullOr colors` - -**Default**: `null` - -### `colorschemes.gruvbox.colorColumn` -**Description**: "The color column background"; - -**Type**: `nullOr colors` - -**Default**: `null` - -### `colorschemes.gruvbox.vertSplitColor` -**Description**: "The vertical split background color"; - -**Type**: `nullOr colors` - -**Default**: `null` - -### `colorschemes.gruvbox.italicizeComments` -**Description**: "Italicize comments"; - -**Type**: `bool` - -**Default**: `true` - -### `colorschemes.gruvbox.italicizeStrings` -**Description**: "Italicize strings"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.invertSelection` -**Description**: "Invert the select text"; - -**Type**: `bool` - -**Default**: `true` - -### `colorschemes.gruvbox.invertSigns` -**Description**: "Invert GitGutter and Syntastic signs"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.invertIndentGuides` -**Description**: "Invert indent guides"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.invertTabline` -**Description**: "Invert tabline highlights"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.improvedStrings` -**Description**: "Improved strings"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.improvedWarnings` -**Description**: "Improved warnings"; - -**Type**: `bool` - -**Default**: `false` - -### `colorschemes.gruvbox.transparentBg` -**Description**: Transparent background - -**Type**: `bool` - -### `colorschemes.gruvbox.trueColor` -**Description**: Enable true color support - -**Type**: `bool` - diff --git a/docs/plugins/colorschemes/one.md b/docs/plugins/colorschemes/one.md deleted file mode 100644 index 2fa8db138d..0000000000 --- a/docs/plugins/colorschemes/one.md +++ /dev/null @@ -1,6 +0,0 @@ -# vim-one -## Options -### `colorschemes.one.enable` -**Description**: Enable vim-one - -**Type**: `bool` diff --git a/docs/plugins/colorschemes/onedark.md b/docs/plugins/colorschemes/onedark.md deleted file mode 100644 index 92621b256b..0000000000 --- a/docs/plugins/colorschemes/onedark.md +++ /dev/null @@ -1,6 +0,0 @@ -# onedark -## Options -### `colorschemes.onedark.enable` -**Description**: Enable onedark - -**Type**: `bool` diff --git a/docs/plugins/colorschemes/tokyonight.md b/docs/plugins/colorschemes/tokyonight.md deleted file mode 100644 index efb53b118e..0000000000 --- a/docs/plugins/colorschemes/tokyonight.md +++ /dev/null @@ -1,70 +0,0 @@ -# tokyonight -This plugin sets up the `tokyonight` colorscheme. - -## Options -### `colorschemes.tokyonight.enable` -**Description**: Enable tokyonight - -**Type***: `bool` - -### `colorschemes.tokyonight.style` -**Description**: Theme style - -**Type**: `nullOr (enum [ "storm" "night" "day" ])` - -**Default**: `null` - -### `colorschemes.tokyonight.terminalColors` -**Description**: Configure the colors used when opening a `:terminal` in Neovim - -**Type**: `bool` - -### `colorschemes.tokyonight.italicComments` -**Description**: Make comments italic - -**Type**: `bool` - -### `colorschemes.tokyonight.italicKeywords` -**Description**: Make keywords italic - -**Type**: `bool` - -### `colorschemes.tokyonight.italicFunctions` -**Description**: Make functions italic - -**Type**: `bool` - -### `colorschemes.tokyonight.italicVariables` -**Description**: Make variables and identifiers italic - -**Type**: `bool` - -### `colorschemes.tokyonight.transparent` -**Description**: Enable this to disable setting the background color - -**Type**: `bool` - -### `colorschemes.tokyonight.hideInactiveStatusline` -**Description**: Enabling this option will hide inactive statuslines and replace them with a thin border - -**Type**: `bool` - -### `colorschemes.tokyonight.transparentSidebar` -**Description**: Sidebar like windows like NvimTree get a transparent background - -**Type**: `bool` - -### `colorschemes.tokyonight.darkSidebar` -**Description**: Sidebar like windows like NvimTree get a darker background - -**Type**: `bool` - -### `colorschemes.tokyonight.darkFloat` -**Description**: Float windows like the lsp diagnostic windows get a darker background - -**Type**: `bool` - -### `colorschemes.tokyonight.lualineBold` -**Description**: When true, section headers in the lualine theme will be bold - -**Type**: `bool` diff --git a/docs/plugins/git/fugitive.md b/docs/plugins/git/fugitive.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/git/gitgutter.md b/docs/plugins/git/gitgutter.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/languages/ledger.md b/docs/plugins/languages/ledger.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/languages/nix.md b/docs/plugins/languages/nix.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/languages/treesitter.md b/docs/plugins/languages/treesitter.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/languages/zig.md b/docs/plugins/languages/zig.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/nvim-lsp/clangd.md b/docs/plugins/nvim-lsp/clangd.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/nvim-lsp/default.md b/docs/plugins/nvim-lsp/default.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/nvim-lsp/lspsaga.md b/docs/plugins/nvim-lsp/lspsaga.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/nvim-lsp/rnix-lsp.md b/docs/plugins/nvim-lsp/rnix-lsp.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/nvim-lsp/rust-analyzer.md b/docs/plugins/nvim-lsp/rust-analyzer.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/pluginmanagers/packer.md b/docs/plugins/pluginmanagers/packer.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/statuslines/airline.md b/docs/plugins/statuslines/airline.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/statuslines/lightline.md b/docs/plugins/statuslines/lightline.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/barbar.md b/docs/plugins/utils/barbar.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/commentary.md b/docs/plugins/utils/commentary.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/endwise.md b/docs/plugins/utils/endwise.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/goyo.md b/docs/plugins/utils/goyo.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/nvim-autopairs.md b/docs/plugins/utils/nvim-autopairs.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/startify.md b/docs/plugins/utils/startify.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/telescope.md b/docs/plugins/utils/telescope.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/plugins/utils/undotree.md b/docs/plugins/utils/undotree.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/flake.lock b/flake.lock index 96a9886fd9..c4dfdf2486 100644 --- a/flake.lock +++ b/flake.lock @@ -51,22 +51,6 @@ "type": "indirect" } }, - "nmdSrc": { - "flake": false, - "locked": { - "lastModified": 1666190571, - "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", - "owner": "rycee", - "repo": "nmd", - "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, "poetry2nix": { "inputs": { "flake-utils": [ @@ -96,8 +80,7 @@ "inputs": { "beautysh": "beautysh", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "nmdSrc": "nmdSrc" + "nixpkgs": "nixpkgs" } }, "utils": { diff --git a/flake.nix b/flake.nix index a269828695..1e48a65ce2 100644 --- a/flake.nix +++ b/flake.nix @@ -3,13 +3,10 @@ inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.nmdSrc.url = "gitlab:rycee/nmd"; - inputs.nmdSrc.flake = false; - inputs.beautysh.url = "github:lovesegfault/beautysh"; inputs.beautysh.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { self, nixpkgs, nmdSrc, flake-utils, ... }@inputs: + outputs = { self, nixpkgs, flake-utils, ... }@inputs: with nixpkgs.lib; with builtins; let @@ -30,7 +27,7 @@ }; }) - ./plugins/default.nix + # ./plugins/default.nix ]; flakeOutput = @@ -40,11 +37,8 @@ pkgs = import nixpkgs { inherit system; }; in { - packages.docs = import ./docs { - pkgs = import nixpkgs { inherit system; }; - lib = nixpkgs.lib; - nixvimModules = nixvimModules; - inherit nmdSrc; + packages.docs = pkgs.callPackage (import ./docs.nix) { + modules = nixvimModules; }; legacyPackages.makeNixvim = import ./wrappers/standalone.nix pkgs (modules pkgs); diff --git a/modules/highlights.nix b/modules/highlights.nix index 7ba9297a58..0f5fc1f0c0 100644 --- a/modules/highlights.nix +++ b/modules/highlights.nix @@ -1,4 +1,7 @@ -{ config, lib, helpers, ... }: +{ config, lib, ... }: +let + helpers = import ../plugins/helpers.nix { inherit lib; }; +in with lib; { options = { diff --git a/modules/keymaps.nix b/modules/keymaps.nix index b6426a9bed..fa4787dcbb 100644 --- a/modules/keymaps.nix +++ b/modules/keymaps.nix @@ -1,6 +1,8 @@ -{ config, lib, helpers, ... }: +{ config, lib, ... }: with lib; let + helpers = import ../plugins/helpers.nix { inherit lib; }; + mapOption = types.oneOf [ types.str (types.submodule { diff --git a/modules/options.nix b/modules/options.nix index 76bceeb1b2..d3de54c05b 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -1,5 +1,8 @@ -{ config, lib, helpers, ... }: +{ config, lib, ... }: with lib; +let + helpers = import ../plugins/helpers.nix { inherit lib; }; +in { options = { options = mkOption { diff --git a/plugins/colorschemes/base16.nix b/plugins/colorschemes/base16.nix index 218be1915c..34ae17a288 100644 --- a/plugins/colorschemes/base16.nix +++ b/plugins/colorschemes/base16.nix @@ -18,6 +18,7 @@ in colorscheme = mkOption { type = types.enum themes; description = "The base16 colorscheme to use"; + default = head themes; }; setUpBar = mkOption { diff --git a/plugins/colorschemes/tokyonight.nix b/plugins/colorschemes/tokyonight.nix index 2054ef56c2..6d47bddd28 100644 --- a/plugins/colorschemes/tokyonight.nix +++ b/plugins/colorschemes/tokyonight.nix @@ -1,8 +1,9 @@ -{ pkgs, config, lib, helpers, ... }: +{ pkgs, config, lib, ... }: with lib; let cfg = config.colorschemes.tokyonight; style = types.enum [ "storm" "night" "day" ]; + helpers = import ../helpers.nix { inherit lib; }; in { options = {