feat: run the config through deadnix

This commit is contained in:
NotAShelf 2023-03-31 05:20:35 +03:00
parent 655c193540
commit d8b52451dd
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
98 changed files with 45 additions and 253 deletions

View file

@ -3,7 +3,6 @@
outputs = {
nixpkgs,
flake-parts,
zig,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {

View file

@ -1,20 +1,15 @@
{inputs, ...}: let
inherit (import ../extra.nix inputs) neovimConfiguration mainConfig;
tidalConfig = {
config.vim.tidal.enable = true;
};
buildPkg = pkgs: modules:
(neovimConfiguration {
inherit pkgs modules;
})
(neovimConfiguration {inherit pkgs modules;})
.neovim;
nixConfig = mainConfig false;
maximalConfig = mainConfig true;
tidalConfig = {config.vim.tidal.enable = true;};
in {
flake.overlays.default = final: prev: {
flake.overlays.default = _final: prev: {
inherit neovimConfiguration;
neovim-nix = buildPkg prev [nixConfig];
neovim-maximal = buildPkg prev [maximalConfig];

View file

@ -3,7 +3,6 @@
system,
config,
pkgs,
lib,
...
}: {
packages = let

View file

@ -77,7 +77,7 @@ in {
topoSort = dag: let
dagBefore = dag: name:
builtins.attrNames
(filterAttrs (n: v: builtins.elem name v.before) dag);
(filterAttrs (_n: v: builtins.elem name v.before) dag);
normalizedDag =
mapAttrs (n: v: {
name = n;

View file

@ -5,9 +5,7 @@
...
}:
with lib;
with builtins; let
cfg = config.vim.assistant.copilot;
in {
with builtins; {
options.vim.assistant.copilot = {
enable = mkEnableOption "Enable GitHub Copilot";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.assistant.tabnine;
in {
with builtins; {
options.vim.assistant.tabnine = {
enable = mkEnableOption "Enable TabNine assistant";

View file

@ -1,5 +1,4 @@
{
pkgs,
lib,
config,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with builtins; let
cfg = config.vim.autopairs;
in {
with builtins; {
options.vim = {
autopairs = {
enable = mkOption {

View file

@ -1,5 +1,4 @@
{
pkgs,
lib,
config,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with builtins; let
cfg = config.vim;
in {
with builtins; {
options.vim = {
debugMode = {
enable = mkEnableOption "Enable debug mode";

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.comments.comment-nvim;
in {
with builtins; {
options.vim.comments.comment-nvim = {
enable = mkEnableOption "comment-nvim";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
lib,
config,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with builtins; let
cfg = config.vim.autocomplete;
in {
with builtins; {
options.vim = {
autocomplete = {
enable = mkOption {

View file

@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
...
}:
with lib;
@ -135,7 +134,7 @@ in {
else (toJSON val)
);
filterNonNull = mappings: filterAttrs (name: value: value != null) mappings;
filterNonNull = mappings: filterAttrs (_name: value: value != null) mappings;
globalsScript =
mapAttrsFlatten (name: value: "let g:${name}=${valToVim value}")
(filterNonNull cfg.globals);

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.dashboard.alpha;
in {
with builtins; {
options.vim.dashboard.alpha = {
enable = mkEnableOption "alpha";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.dashboard.dashboard-nvim;
in {
with builtins; {
options.vim.dashboard.dashboard-nvim = {
enable = mkEnableOption "dashboard-nvim";
};

View file

@ -1,7 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
imports = [

View file

@ -1,18 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with builtins;
with lib; let
cfg = config.vim.dashboard.startify;
mkVimBool = val:
if val
then "1"
else "0";
in {
with lib; {
options.vim.dashboard.startify = {
enable = mkEnableOption "Enable startify";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -5,9 +5,7 @@
...
}:
with lib;
with builtins; let
cfg = config.vim.filetree.nvimTreeLua;
in {
with builtins; {
options.vim.filetree.nvimTreeLua = {
enable = mkOption {
type = types.bool;

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
imports = [

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...
@ -23,12 +22,7 @@ in {
config =
mkIf cfg.enable
(
let
mkVimBool = val:
if val
then "1"
else "0";
in {
{
vim.startPlugins =
if (cfg.gitsigns.enable)
then ["gitsigns-nvim"]

View file

@ -1,7 +1,4 @@
{
config,
lib,
pkgs,
...
}: {
imports = [

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
with builtins; {
options.vim.lsp = {
lightbulb = {
enable = mkEnableOption "lightbulb for code actions. Requires emoji font";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
with builtins; {
options.vim.lsp = {
lspSignature = {
enable = mkEnableOption "lsp signature viewer";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
with builtins; {
options.vim.lsp = {
nvimCodeActionMenu = {
enable = mkEnableOption "nvim code action menu";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
with builtins; {
options.vim.lsp = {
trouble = {
enable = mkEnableOption "trouble diagnostics viewer";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
config,
lib,
pkgs,
...
}: {
imports = [

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.markdown.glow;
in {
with builtins; {
options.vim.markdown.glow = {
enable = mkOption {
type = types.bool;

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.minimap.codewindow;
in {
with builtins; {
options.vim.minimap.codewindow = {
enable = mkEnableOption "Enable minimap-vim plugin";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
pkgs,
lib,
config,
...
}: {
imports = [

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.minimap.minimap-vim;
in {
with builtins; {
options.vim.minimap.minimap-vim = {
enable = mkEnableOption "Enable minimap-vim plugin";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notes.mind-nvim;
in {
with builtins; {
options.vim.notes.mind-nvim = {
enable = mkEnableOption "The power of trees at your fingertips. ";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,14 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notes.obsidian;
auto = config.vim.autocomplete;
in {
with builtins; {
options.vim.notes = {
obsidian = {
enable = mkEnableOption "Complementary neovim plugins for Obsidian editor";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notes.orgmode;
in {
with builtins; {
options.vim.notes.orgmode = {
enable = mkEnableOption "Neovim plugin for Emac Orgmode. Get the best of both worlds.";
orgAgendaFiles = mkOption {

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notes.todo-comments;
in {
with builtins; {
options.vim.notes.todo-comments = {
enable = mkEnableOption "todo-comments";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notify.nvim-notify;
in {
with builtins; {
options.vim.notify.nvim-notify = {
enable = mkEnableOption "Enable nvim-notify plugin";
stages = mkOption {

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.presence.presence-nvim;
in {
with builtins; {
options.vim.presence.presence-nvim = {
enable = mkEnableOption "Enable presence.nvim plugin";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.session.nvim-session-manager;
in {
with builtins; {
options.vim.session.nvim-session-manager = {
enable = mkEnableOption "Enable nvim-session-manager";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.snippets.vsnip;
in {
with builtins; {
options.vim.snippets.vsnip = {
enable = mkEnableOption "Enable vim-vsnip";
};

View file

@ -1,7 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
imports = [

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,12 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.statusline.lualine;
supported_themes = import ./supported_themes.nix;
in {
options.vim.statusline.lualine = {

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.tabline.nvimBufferline;
in {
with builtins; {
options.vim.tabline.nvimBufferline = {
enable = mkEnableOption "nvim-bufferline-lua";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.terminal.toggleterm;
in {
with builtins; {
options.vim.terminal.toggleterm = {
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
direction = mkOption {

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
imports = [

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
config,
lib,
pkgs,
...
}: {
imports = [

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.tidal;
in {
with builtins; {
options.vim.tidal = {
enable = mkEnableOption "tidal tools and plugins";

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
config,
lib,
pkgs,
...
}: {
imports = [

View file

@ -5,9 +5,7 @@
...
}:
with lib;
with builtins; let
cfg = config.vim.treesitter;
in {
with builtins; {
options.vim.treesitter = {
enable = mkOption {
default = false;

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.ui.noice;
in {
with builtins; {
options.vim.ui.noice = {
enable = mkEnableOption "noice-nvim";
};

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.binds.cheatsheet;
in {
with builtins; {
options.vim.binds.cheatsheet = {
enable = mkEnableOption "Searchable cheatsheet for nvim using telescope";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.binds.whichKey;
in {
with builtins; {
options.vim.binds.whichKey = {
enable = mkEnableOption "which-key menu";
};

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.colorizer;
in {
with builtins; {
options.vim.utility.colorizer = {
enable = mkEnableOption "ccc color picker for neovim";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.diffview-nvim;
in {
with builtins; {
options.vim.utility.diffview-nvim = {
enable = mkEnableOption "Enable diffview-nvim";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.gestures.gesture-nvim;
in {
with builtins; {
options.vim.gestures.gesture-nvim = {
enable = mkEnableOption "Enable gesture-nvim plugin";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.icon-picker;
in {
with builtins; {
options.vim.utility.icon-picker = {
enable = mkEnableOption "Nerdfonts icon picker for nvim";
};

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.telescope;
in {
with builtins; {
options.vim.telescope = {
enable = mkEnableOption "enable telescope";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.venn-nvim;
in {
with builtins; {
options.vim.utility.venn-nvim = {
enable = mkEnableOption "draw ASCII diagrams in Neovim";
};

View file

@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
...

View file

@ -1,7 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
imports = [

View file

@ -1,13 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.visuals;
in {
with builtins; {
options.vim.visuals = {
enable = mkOption {
type = types.bool;