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 = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -10,4 +10,5 @@
|
|||
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";
|
||||
};
|
||||
in
|
||||
[
|
||||
{
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>n";
|
||||
action = "<cmd>enew<cr>";
|
||||
|
|
@ -30,4 +31,5 @@ in
|
|||
action = "<cmd>split<cr>";
|
||||
options.desc = "Split horizontally";
|
||||
}
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
# Use :options to get the list of all options
|
||||
# Use :h <option> to load help for given <option>
|
||||
{
|
||||
opts = {
|
||||
# Hide command line unless needed
|
||||
cmdheight = 0;
|
||||
|
||||
|
|
@ -100,4 +101,5 @@
|
|||
|
||||
# Disable line wrapping
|
||||
wrap = false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
11
default.nix
11
default.nix
|
|
@ -1,13 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
_:
|
||||
|
||||
{
|
||||
imports = [ ./plugins ];
|
||||
imports = [
|
||||
./config
|
||||
./plugins
|
||||
];
|
||||
|
||||
config = {
|
||||
colorschemes = import ./config/colorscheme.nix;
|
||||
keymaps = import ./config/keymaps.nix;
|
||||
opts = import ./config/options.nix;
|
||||
|
||||
# Needed for telescope live grep
|
||||
extraPackages = [ pkgs.ripgrep ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue