Revert removal of types.anything, that broke mkIf

This commit is contained in:
Pedro Alves 2021-02-10 14:20:36 +00:00
parent 8747a8576b
commit 657e5e6efb
3 changed files with 23 additions and 3 deletions

View file

@ -116,18 +116,18 @@ in
};
configure = mkOption {
type = types.attrs;
type = types.attrsOf types.anything;
default = { };
};
options = mkOption {
type = types.attrs;
type = types.attrsOf types.anything;
default = { };
description = "The configuration options, e.g. line numbers";
};
globals = mkOption {
type = types.attrs;
type = types.attrsOf types.anything;
default = { };
description = "Global variables";
};

View file

@ -0,0 +1,19 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.programs.nixvim.colorschemes.base16;
colors = types.enum [ "bg" "red" "green" "yellow" "blue" "purple" "aqua" "gray" "fg" "bg0_h" "bg0" "bg1" "bg2" "bg3" "bg4" "gray" "orange" "bg0_s" "fg0" "fg1" "fg2" "fg3" "fg4" ];
in {
options = {
programs.nixvim.colorschemes.base16 = {
enable = mkEnableOption "Enable base16";
};
};
config = mkIf cfg.enable {
programs.nixvim = {
colorscheme = "base16-default-dark";
extraPlugins = [ pkgs.vimPlugins.base16-vim ];
};
};
}

View file

@ -1,6 +1,7 @@
{
imports = [
./colorschemes/gruvbox.nix
./colorschemes/base16.nix
./statuslines/lightline.nix
./statuslines/airline.nix