Refactored file structure to make more sense, made default.nixes less verbose
This commit is contained in:
17
modules/sys/configuration.nix
Normal file
17
modules/sys/configuration.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware
|
||||
./software
|
||||
./environment
|
||||
../home/home-manager.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
desktop_modules =
|
||||
if (host == "oganesson")
|
||||
then [
|
||||
./software/virtualization.nix
|
||||
]
|
||||
else [];
|
||||
in {
|
||||
imports =
|
||||
[(import ./hardware/bootloader.nix)]
|
||||
++ [(import ./hardware/network.nix)]
|
||||
++ [(import ./software/packages.nix)]
|
||||
++ [(import ./software/programs.nix)]
|
||||
++ [(import ./software/services.nix)]
|
||||
++ [(import ./environment/sddm.nix)]
|
||||
++ [(import ./environment/users.nix)]
|
||||
++ [(import ./environment/stylix.nix)]
|
||||
++ desktop_modules;
|
||||
}
|
||||
16
modules/sys/environment/default.nix
Normal file
16
modules/sys/environment/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
nixvim,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[(import ./sddm.nix)]
|
||||
++ [(import ./stylix.nix)];
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
self,
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
nur = config.nur;
|
||||
in {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {inherit self inputs host username nur;};
|
||||
users.${username} = {
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
./../../home
|
||||
];
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
groups.persist = {};
|
||||
users = {
|
||||
root.initialPassword = "1234";
|
||||
${username} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "1234";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = ["wheel" "persist" "libvirtd"];
|
||||
};
|
||||
};
|
||||
};
|
||||
security.sudo.extraConfig = ''
|
||||
${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
|
||||
'';
|
||||
nix.settings.allowed-users = ["${username}"];
|
||||
}
|
||||
16
modules/sys/hardware/default.nix
Normal file
16
modules/sys/hardware/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
nixvim,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[( import ./bootloader.nix )]
|
||||
++ [( import ./network.nix )];
|
||||
}
|
||||
|
||||
24
modules/sys/software/default.nix
Normal file
24
modules/sys/software/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
let
|
||||
desktop_modules = if (host == "oganesson") then
|
||||
[(import ./virtualization.nix)]
|
||||
else [];
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[(import ./packages.nix)]
|
||||
++ [(import ./programs.nix)]
|
||||
++ [(import ./services.nix)]
|
||||
++ [(import ./nixvim)]
|
||||
++ desktop_modules;
|
||||
}
|
||||
|
||||
36
modules/sys/software/nixvim/autocmd.nix
Normal file
36
modules/sys/software/nixvim/autocmd.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{...}: {
|
||||
programs.nixvim = {
|
||||
autoCmd = [
|
||||
{
|
||||
command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
|
||||
event = ["VimEnter"];
|
||||
pattern = ["*"];
|
||||
desc = "Create a floating terminal, placed in the top right";
|
||||
}
|
||||
{
|
||||
command = "silent! mkview";
|
||||
event = ["BufWinLeave"];
|
||||
pattern = ["*"];
|
||||
desc = "Save session window settings to be loaded next time the file is opened";
|
||||
}
|
||||
{
|
||||
command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &";
|
||||
event = ["BufWinLeave"];
|
||||
pattern = ["*"];
|
||||
desc = "Play a neat little sound effect when you close neovim";
|
||||
}
|
||||
{
|
||||
command = "silent! loadview";
|
||||
event = ["BufWinEnter"];
|
||||
pattern = ["*"];
|
||||
desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)";
|
||||
}
|
||||
{
|
||||
command = "setlocal textwidth = 135";
|
||||
event = ["BufWinEnter" "BufEnter"];
|
||||
pattern = ["*.md" "*.wiki" "*.txt"];
|
||||
desc = "Set automatic linebreaks in plain text file formats";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
12
modules/sys/software/nixvim/default.nix
Normal file
12
modules/sys/software/nixvim/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./plugins
|
||||
./options.nix
|
||||
./keymaps.nix
|
||||
./autocmd.nix
|
||||
];
|
||||
}
|
||||
31
modules/sys/software/nixvim/keymaps.nix
Normal file
31
modules/sys/software/nixvim/keymaps.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
action = "<C-W>W";
|
||||
key = "<S-Tab>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<C-w>w";
|
||||
key = "<Tab>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>FloatermToggle shadeterm<CR>";
|
||||
key = "<F2>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>NvimTreeToggle<CR>";
|
||||
key = "<F3>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>FloatermToggle shadeterm<CR>";
|
||||
key = "<F2>";
|
||||
mode = "t";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
36
modules/sys/software/nixvim/options.nix
Normal file
36
modules/sys/software/nixvim/options.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
diagnostics.signs = false;
|
||||
extraConfigLua = ''
|
||||
if vim.g.started_by_firenvim == true then
|
||||
vim.o.laststatus = 0
|
||||
end
|
||||
if vim.g.neovide then
|
||||
vim.g.neovide_refresh_rate = 144
|
||||
vim.g.neovide_cursor_vfx_mode = "sonicboom"
|
||||
vim.g.neovide_cursor_animate_in_insert_mode = false
|
||||
end
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.scrolloff = 6
|
||||
vim.opt.undofile = true
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.wrap = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.textwidth = 0
|
||||
vim.opt.breakat = " \t!@*-+;:,./?"
|
||||
|
||||
vim.g.mapleader = "!"
|
||||
'';
|
||||
};
|
||||
}
|
||||
8
modules/sys/software/nixvim/plugins/alpha.nix
Normal file
8
modules/sys/software/nixvim/plugins/alpha.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.alpha = {
|
||||
enable = true;
|
||||
theme = "dashboard";
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/sys/software/nixvim/plugins/barbar.nix
Normal file
10
modules/sys/software/nixvim/plugins/barbar.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.barbar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_hide = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/sys/software/nixvim/plugins/cmp.nix
Normal file
12
modules/sys/software/nixvim/plugins/cmp.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.cmp = {
|
||||
autoEnableSources = true;
|
||||
settings.sources = [
|
||||
{name = "nvim_lsp";}
|
||||
{name = "path";}
|
||||
{name = "buffer";}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/sys/software/nixvim/plugins/coq.nix
Normal file
10
modules/sys/software/nixvim/plugins/coq.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.coq-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_start = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/sys/software/nixvim/plugins/default.nix
Normal file
15
modules/sys/software/nixvim/plugins/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
imports = [
|
||||
./alpha.nix
|
||||
./vim-matchup.nix
|
||||
./coq.nix
|
||||
./barbar.nix
|
||||
./cmp.nix
|
||||
./lsp.nix
|
||||
./lualine.nix
|
||||
./plugins.nix
|
||||
./nvim-tree.nix
|
||||
./telescope.nix
|
||||
./extra_plugins.nix
|
||||
];
|
||||
}
|
||||
52
modules/sys/software/nixvim/plugins/extra_plugins.nix
Normal file
52
modules/sys/software/nixvim/plugins/extra_plugins.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
extraPlugins = [
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
# vimwiki
|
||||
name = "vimwiki";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vimwiki";
|
||||
repo = "vimwiki";
|
||||
rev = "705ad1e0dded0e3b7ff5fac78547ab67c9d39bdf";
|
||||
hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-markdown";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "preservim";
|
||||
repo = "vim-markdown";
|
||||
rev = "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51";
|
||||
hash = "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-sneak";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "justinmk";
|
||||
repo = "vim-sneak";
|
||||
rev = "c13d0497139b8796ff9c44ddb9bc0dc9770ad2dd";
|
||||
hash = "sha256-ndWhnV0fgCcqCGwVyM07GfmUB3CitBZbOWvZtsB1tBk=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-slash";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "junegunn";
|
||||
repo = "vim-slash";
|
||||
rev = "31aee09b7ea8893a18fa34f65e63e364fc998444";
|
||||
hash = "sha256-hC590lmKBssLCSKPF9O2cnt6TCJkklzbbhDNhf1ozUU=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "automkdir.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "mateuszwieloch";
|
||||
repo = "automkdir.nvim";
|
||||
rev = "beeb2dd76f1c3ac776d901c43217a774f1f045de";
|
||||
hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU=";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
20
modules/sys/software/nixvim/plugins/lsp.nix
Normal file
20
modules/sys/software/nixvim/plugins/lsp.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
ccls.enable = true;
|
||||
clangd.enable = true;
|
||||
cmake.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
marksman.enable = true;
|
||||
nil_ls.enable = true;
|
||||
pyright.enable = true;
|
||||
sqls.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
modules/sys/software/nixvim/plugins/lualine.nix
Normal file
44
modules/sys/software/nixvim/plugins/lualine.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
icons_enabled = true;
|
||||
theme = "auto";
|
||||
component_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
section_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
always_divide_middle = true;
|
||||
globalstatus = false;
|
||||
refresh = {
|
||||
statusline = 1000;
|
||||
tabline = 1000;
|
||||
winbar = 1000;
|
||||
};
|
||||
};
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["buffers"];
|
||||
lualine_c = [""];
|
||||
lualine_x = ["searchcount" "fileformat" "filetype"];
|
||||
lualine_y = ["branch" "diff" "diagnostics"];
|
||||
lualine_z = ["location"];
|
||||
};
|
||||
inactive_sections = {
|
||||
lualine_a = [];
|
||||
lualine_b = [];
|
||||
lualine_c = ["filename"];
|
||||
lualine_x = ["location"];
|
||||
lualine_y = [];
|
||||
lualine_z = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
88
modules/sys/software/nixvim/plugins/nvim-tree.nix
Normal file
88
modules/sys/software/nixvim/plugins/nvim-tree.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.nvim-tree = {
|
||||
enable = true;
|
||||
hijackUnnamedBufferWhenOpening = false;
|
||||
openOnSetup = false;
|
||||
onAttach = {
|
||||
__raw = ''
|
||||
function(bufnr)
|
||||
local api = require('nvim-tree.api')
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- BEGIN_DEFAULT_ON_ATTACH
|
||||
vim.keymap.set('n', '<C-]>', api.tree.change_root_to_node, opts('CD'))
|
||||
vim.keymap.set('n', '<C-e>', api.node.open.replace_tree_buffer, opts('Open: In Place'))
|
||||
vim.keymap.set('n', '<C-k>', api.node.show_info_popup, opts('Info'))
|
||||
vim.keymap.set('n', '<C-r>', api.fs.rename_sub, opts('Rename: Omit Filename'))
|
||||
vim.keymap.set('n', '<C-t>', api.node.open.tab, opts('Open: New Tab'))
|
||||
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||
vim.keymap.set('n', '<C-x>', api.node.open.horizontal, opts('Open: Horizontal Split'))
|
||||
vim.keymap.set('n', '<BS>', api.node.navigate.parent_close, opts('Close Directory'))
|
||||
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', 'b', api.node.open.preview, opts('Open Preview'))
|
||||
vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling'))
|
||||
vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling'))
|
||||
vim.keymap.set('n', '.', api.node.run.cmd, opts('Run Command'))
|
||||
vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up'))
|
||||
vim.keymap.set('n', 'a', api.fs.create, opts('Create File Or Directory'))
|
||||
vim.keymap.set('n', 'bd', api.marks.bulk.delete, opts('Delete Bookmarked'))
|
||||
vim.keymap.set('n', 'bt', api.marks.bulk.trash, opts('Trash Bookmarked'))
|
||||
vim.keymap.set('n', 'bmv', api.marks.bulk.move, opts('Move Bookmarked'))
|
||||
vim.keymap.set('n', 'B', api.tree.toggle_no_buffer_filter, opts('Toggle Filter: No Buffer'))
|
||||
vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy'))
|
||||
vim.keymap.set('n', 'C', api.tree.toggle_git_clean_filter, opts('Toggle Filter: Git Clean'))
|
||||
vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git'))
|
||||
vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git'))
|
||||
vim.keymap.set('n', 'd', api.fs.remove, opts('Delete'))
|
||||
vim.keymap.set('n', 'D', api.fs.trash, opts('Trash'))
|
||||
vim.keymap.set('n', 'E', api.tree.expand_all, opts('Expand All'))
|
||||
vim.keymap.set('n', 'e', api.fs.rename_basename, opts('Rename: Basename'))
|
||||
vim.keymap.set('n', ']e', api.node.navigate.diagnostics.next, opts('Next Diagnostic'))
|
||||
vim.keymap.set('n', '[e', api.node.navigate.diagnostics.prev, opts('Prev Diagnostic'))
|
||||
vim.keymap.set('n', 'F', api.live_filter.clear, opts('Live Filter: Clear'))
|
||||
vim.keymap.set('n', 'f', api.live_filter.start, opts('Live Filter: Start'))
|
||||
vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
|
||||
vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path'))
|
||||
vim.keymap.set('n', 'ge', api.fs.copy.basename, opts('Copy Basename'))
|
||||
vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Filter: Dotfiles'))
|
||||
vim.keymap.set('n', 'I', api.tree.toggle_gitignore_filter, opts('Toggle Filter: Git Ignore'))
|
||||
vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling'))
|
||||
vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling'))
|
||||
vim.keymap.set('n', 'L', api.node.open.toggle_group_empty, opts('Toggle Group Empty'))
|
||||
vim.keymap.set('n', 'M', api.tree.toggle_no_bookmark_filter, opts('Toggle Filter: No Bookmark'))
|
||||
vim.keymap.set('n', 'm', api.marks.toggle, opts('Toggle Bookmark'))
|
||||
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', 'O', api.node.open.no_window_picker, opts('Open: No Window Picker'))
|
||||
vim.keymap.set('n', 'p', api.fs.paste, opts('Paste'))
|
||||
vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory'))
|
||||
vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
|
||||
vim.keymap.set('n', 'r', api.fs.rename, opts('Rename'))
|
||||
vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh'))
|
||||
vim.keymap.set('n', 's', api.node.run.system, opts('Run System'))
|
||||
vim.keymap.set('n', 'S', api.tree.search_node, opts('Search'))
|
||||
vim.keymap.set('n', 'u', api.fs.rename_full, opts('Rename: Full Path'))
|
||||
vim.keymap.set('n', 'U', api.tree.toggle_custom_filter, opts('Toggle Filter: Hidden'))
|
||||
vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse'))
|
||||
vim.keymap.set('n', 'x', api.fs.cut, opts('Cut'))
|
||||
vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name'))
|
||||
vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path'))
|
||||
vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
|
||||
-- END_DEFAULT_ON_ATTACH
|
||||
end
|
||||
'';
|
||||
};
|
||||
view = {
|
||||
side = "right";
|
||||
centralizeSelection = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
width = 40;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/sys/software/nixvim/plugins/plugins.nix
Normal file
24
modules/sys/software/nixvim/plugins/plugins.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
nvim-surround.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
treesitter.enable = true;
|
||||
lastplace.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
gitsigns.enable = true;
|
||||
web-devicons.enable = true;
|
||||
endwise.enable = true;
|
||||
marks.enable = true;
|
||||
trouble.enable = true;
|
||||
floaterm.enable = true;
|
||||
fugitive.enable = true;
|
||||
rustaceanvim.enable = true;
|
||||
firenvim.enable = true;
|
||||
dap = {
|
||||
enable = true;
|
||||
extensions.dap-ui.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/sys/software/nixvim/plugins/telescope.nix
Normal file
14
modules/sys/software/nixvim/plugins/telescope.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
settings = {
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/sys/software/nixvim/plugins/vim-matchup.nix
Normal file
23
modules/sys/software/nixvim/plugins/vim-matchup.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.vim-matchup = {
|
||||
enable = true;
|
||||
enableSurround = true;
|
||||
textObj.enable = true;
|
||||
motion = {
|
||||
enable = true;
|
||||
cursorEnd = true;
|
||||
};
|
||||
matchParen = {
|
||||
hiSurroundAlways = true;
|
||||
offscreen = {
|
||||
method = "popup";
|
||||
};
|
||||
};
|
||||
treesitterIntegration = {
|
||||
enable = true;
|
||||
includeMatchWords = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user