new-structure #1
13 changed files with 65 additions and 69 deletions
|
|
@ -1,6 +1,64 @@
|
||||||
{lib, ...}: let
|
{pkgs, ...}: {
|
||||||
definitions = lib.attrNames (lib.filterAttrs (filename: kind:
|
imports = [
|
||||||
filename != "default.nix" && (kind == "regular" || kind == "directory"))
|
./colorscheme.nix
|
||||||
(builtins.readDir ./.));
|
./options.nix
|
||||||
in
|
./plugins
|
||||||
lib.mkMerge (map (file: import ./${file}) definitions)
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Use <Space> as leader key
|
||||||
|
globals.mapleader = " ";
|
||||||
|
globals.maplocalleader = " ";
|
||||||
|
|
||||||
|
# Set 'vi' and 'vim' aliases to nixvim
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
# Setup clipboard support
|
||||||
|
clipboard = {
|
||||||
|
# Use xsel as clipboard provider
|
||||||
|
# providers.xsel.enable = true;
|
||||||
|
|
||||||
|
# Sync system clipboard
|
||||||
|
register = "unnamedplus";
|
||||||
|
};
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
nix-inspect
|
||||||
|
nixd
|
||||||
|
git
|
||||||
|
git-lfs
|
||||||
|
cloc
|
||||||
|
ripgrep
|
||||||
|
lazygit
|
||||||
|
black
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gg";
|
||||||
|
action = "<cmd>LazyGit<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "LazyGit (root dir)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
lazygit-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("telescope").load_extension("lazygit")
|
||||||
|
'';
|
||||||
|
performance = {
|
||||||
|
byteCompileLua = {
|
||||||
|
enable = true;
|
||||||
|
nvimRuntime = true;
|
||||||
|
configs = true;
|
||||||
|
plugins = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
||||||
60
default.nix
60
default.nix
|
|
@ -1,60 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
imports = [./config ./plugins];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Use <Space> as leader key
|
|
||||||
globals.mapleader = " ";
|
|
||||||
globals.maplocalleader = " ";
|
|
||||||
|
|
||||||
# Set 'vi' and 'vim' aliases to nixvim
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
# Setup clipboard support
|
|
||||||
clipboard = {
|
|
||||||
# Use xsel as clipboard provider
|
|
||||||
# providers.xsel.enable = true;
|
|
||||||
|
|
||||||
# Sync system clipboard
|
|
||||||
register = "unnamedplus";
|
|
||||||
};
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
nix-inspect
|
|
||||||
nixd
|
|
||||||
git
|
|
||||||
git-lfs
|
|
||||||
cloc
|
|
||||||
ripgrep
|
|
||||||
lazygit
|
|
||||||
black
|
|
||||||
fd
|
|
||||||
ripgrep
|
|
||||||
];
|
|
||||||
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gg";
|
|
||||||
action = "<cmd>LazyGit<CR>";
|
|
||||||
options = {
|
|
||||||
desc = "LazyGit (root dir)";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
|
||||||
lazygit-nvim
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfigLua = ''
|
|
||||||
require("telescope").load_extension("lazygit")
|
|
||||||
'';
|
|
||||||
performance = {
|
|
||||||
byteCompileLua = {
|
|
||||||
enable = true;
|
|
||||||
nvimRuntime = true;
|
|
||||||
configs = true;
|
|
||||||
plugins = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -41,9 +41,7 @@
|
||||||
mkNixvim = specialArgs:
|
mkNixvim = specialArgs:
|
||||||
nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
module = ./config;
|
||||||
module = ./.;
|
|
||||||
|
|
||||||
extraSpecialArgs =
|
extraSpecialArgs =
|
||||||
specialArgs
|
specialArgs
|
||||||
// {
|
// {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue