refactor(homeModules/cli): idomaticity
This commit is contained in:
parent
feff604e8f
commit
84bacb23f0
7 changed files with 22 additions and 25 deletions
|
@ -1,19 +1,13 @@
|
|||
{config, lib, osConfig, ... }:
|
||||
{
|
||||
imports = [
|
||||
./file-browser/yazi.nix
|
||||
./editor/nvf.nix
|
||||
./shell/zsh.nix
|
||||
./utilities/git.nix
|
||||
];
|
||||
|
||||
options.cli = {
|
||||
shell = lib.pantheon.mkStrOption;
|
||||
editor = lib.pantheon.mkStrOption;
|
||||
file-browser = lib.pantheon.mkStrOption;
|
||||
git = {
|
||||
name = lib.pantheon.mkStrOption;
|
||||
email = lib.pantheon.mkStrOption;
|
||||
defaultBranch = lib.pantheon.mkStrOption;
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,15 +5,7 @@
|
|||
programs.nvf = {
|
||||
enable = true;
|
||||
settings.vim = {
|
||||
keymaps = [
|
||||
{
|
||||
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
|
||||
key = "gf";
|
||||
mode = "n";
|
||||
action = ":cd %:p:h<CR>:e <cfile><CR>";
|
||||
silent = true;
|
||||
}
|
||||
];
|
||||
keymaps = import ./keymaps.nix;
|
||||
utility.yazi-nvim = {
|
||||
enable = true;
|
||||
mappings = {
|
9
modules/home/cli/editor/nvf/keymaps.nix
Normal file
9
modules/home/cli/editor/nvf/keymaps.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
|
||||
key = "gf";
|
||||
mode = "n";
|
||||
action = ":cd %:p:h<CR>:e <cfile><CR>";
|
||||
silent = true;
|
||||
}
|
||||
]
|
5
modules/home/cli/file-browser/default.nix
Normal file
5
modules/home/cli/file-browser/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./yazi.nix
|
||||
];
|
||||
}
|
3
modules/home/cli/utilities/default.nix
Normal file
3
modules/home/cli/utilities/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
imports = [ ./git.nix ];
|
||||
}
|
|
@ -1,11 +1,5 @@
|
|||
{lib,config,...}:
|
||||
{
|
||||
options.cli.git = {
|
||||
name = lib.pantheon.mkStrOption;
|
||||
email = lib.pantheon.mkStrOption;
|
||||
defaultBranch = lib.pantheon.mkStrOption;
|
||||
};
|
||||
|
||||
config = {
|
||||
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
|
||||
home.shellAliases = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue