refactor(config): auto-import config files
This commit is contained in:
parent
1c12503ebf
commit
465916d5c1
5 changed files with 126 additions and 109 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
# Use catppuccin mocha variant
|
|
||||||
{
|
{
|
||||||
|
colorschemes = {
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -10,4 +10,5 @@
|
||||||
transparent_background = true;
|
transparent_background = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
config/default.nix
Normal file
13
config/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }@args:
|
||||||
|
|
||||||
|
let
|
||||||
|
definitions = lib.attrNames (
|
||||||
|
lib.filterAttrs
|
||||||
|
(filename: kind:
|
||||||
|
filename != "default.nix"
|
||||||
|
&& (kind == "regular" || kind == "directory")
|
||||||
|
)
|
||||||
|
(builtins.readDir ./.)
|
||||||
|
);
|
||||||
|
in
|
||||||
|
lib.mkMerge (map (file: import ./${file}) definitions)
|
||||||
|
|
@ -4,7 +4,8 @@ let
|
||||||
options.desc = "Force write";
|
options.desc = "Force write";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
[
|
{
|
||||||
|
keymaps = [
|
||||||
{
|
{
|
||||||
key = "<leader>n";
|
key = "<leader>n";
|
||||||
action = "<cmd>enew<cr>";
|
action = "<cmd>enew<cr>";
|
||||||
|
|
@ -30,4 +31,5 @@ in
|
||||||
action = "<cmd>split<cr>";
|
action = "<cmd>split<cr>";
|
||||||
options.desc = "Split horizontally";
|
options.desc = "Split horizontally";
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
# Use :options to get the list of all options
|
# Use :options to get the list of all options
|
||||||
# Use :h <option> to load help for given <option>
|
# Use :h <option> to load help for given <option>
|
||||||
{
|
{
|
||||||
|
opts = {
|
||||||
# Hide command line unless needed
|
# Hide command line unless needed
|
||||||
cmdheight = 0;
|
cmdheight = 0;
|
||||||
|
|
||||||
|
|
@ -100,4 +101,5 @@
|
||||||
|
|
||||||
# Disable line wrapping
|
# Disable line wrapping
|
||||||
wrap = false;
|
wrap = false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
default.nix
11
default.nix
|
|
@ -1,13 +1,12 @@
|
||||||
{ pkgs, ... }:
|
_:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./plugins ];
|
imports = [
|
||||||
|
./config
|
||||||
|
./plugins
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
colorschemes = import ./config/colorscheme.nix;
|
|
||||||
keymaps = import ./config/keymaps.nix;
|
|
||||||
opts = import ./config/options.nix;
|
|
||||||
|
|
||||||
# Needed for telescope live grep
|
# Needed for telescope live grep
|
||||||
extraPackages = [ pkgs.ripgrep ];
|
extraPackages = [ pkgs.ripgrep ];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue