refactor(treewide): clean-up, flatten, rework module system
This commit is contained in:
parent
4ddf9d2b35
commit
5590c8a951
58 changed files with 397 additions and 635 deletions
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
let
|
||||
inherit (config.colorscheme) palette;
|
||||
cfg = config.ooknet.console.editor.nvim;
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
|
|
@ -13,7 +15,7 @@ in
|
|||
./plugins
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.neovim = {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ooknet.console.editor.nvim;
|
||||
inherit (lib) mkIf mapAttrsToList;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
|
|
@ -14,7 +16,7 @@ in
|
|||
|
||||
keymaps = let
|
||||
normal =
|
||||
lib.mapAttrsToList
|
||||
mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "n";
|
||||
inherit action key;
|
||||
|
|
@ -25,7 +27,7 @@ in
|
|||
"Y" = "$y";
|
||||
};
|
||||
visual =
|
||||
lib.mapAttrsToList
|
||||
mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "v";
|
||||
inherit action key;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,7 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./indent.nix
|
||||
./telescope.nix
|
||||
./lualine.nix
|
||||
];
|
||||
|
||||
options.ooknet.console.editor.nvim.plugins = {
|
||||
indentBlankline = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable indent-blankline nvim plugin module";
|
||||
};
|
||||
lualine = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable lualine nvim plugin module";
|
||||
};
|
||||
telescope = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable telescope nvim plugin module";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ooknet.console.editor.nvim.plugins;
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.indentBlankline {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.indent-blankline = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ooknet.console.editor.nvim.plugins;
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.lualine {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "base16";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ooknet.console.editor.nvim.plugins;
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.telescope {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
let
|
||||
inherit (config.colorscheme) palette;
|
||||
cfg = config.ooknet.console.editor.nvim;
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
options = {
|
||||
relativenumber = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue