Compare commits

...

2 Commits

2 changed files with 64 additions and 63 deletions

View File

@ -1,8 +1,5 @@
{ inputs, pkgs, ... }: { inputs, pkgs, ... }: {
{ imports = [ inputs.nixvim.homeManagerModules.nixvim ];
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
# Nixvim # Nixvim
programs.nixvim = { programs.nixvim = {
@ -10,15 +7,11 @@
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
keymaps = [ keymaps = [{
{ action = "<cmd>Oil<cr>";
action = "<cmd>Oil<cr>"; key = "<leader>e";
key = "<leader>e"; options = { silent = true; };
options = { }];
silent = true;
};
}
];
options = { options = {
hlsearch = false; hlsearch = false;
@ -47,21 +40,30 @@
splitright = true; splitright = true;
}; };
globals = { globals = {
mapleader = " "; mapleader = " ";
maplocalleader = ";"; maplocalleader = ";";
}; };
extraConfigLuaPre = ''
vim.loader.enable()
'';
extraConfigLuaPost = '' extraConfigLuaPost = ''
vim.notify = require("mini.notify").make_notify() vim.notify = require("mini.notify").make_notify()
''; '';
plugins = { plugins = {
harpoon = { harpoon = {
enable = true; enable = true;
keymaps = { keymaps = {
addFile = "<leader>a"; addFile = "<leader>a";
toggleQuickMenu = "<C-e>"; toggleQuickMenu = "<C-e>";
navFile = { "1" = "<C-j>"; "2" = "<C-k>"; "3" = "<C-l>"; "4" = "<C-;>"; }; navFile = {
"1" = "<C-j>";
"2" = "<C-k>";
"3" = "<C-l>";
"4" = "<C-;>";
};
}; };
}; };
@ -77,11 +79,11 @@
enable = true; enable = true;
signs = { signs = {
add.text = ""; add.text = "";
change.text = ""; change.text = "";
changedelete.text = ""; changedelete.text = "";
delete.text = ""; delete.text = "";
topdelete.text = ""; topdelete.text = "";
untracked.text = ""; untracked.text = "";
}; };
onAttach.function = '' onAttach.function = ''
function(buffer) function(buffer)
@ -95,32 +97,30 @@
map("n", "]g", gs.next_hunk, "Next git hunk") map("n", "]g", gs.next_hunk, "Next git hunk")
map("n", "[g", gs.prev_hunk, "Previous git hunk") map("n", "[g", gs.prev_hunk, "Previous git hunk")
end end
''; '';
}; };
mini = { mini = {
enable = true; enable = true;
modules = { modules = {
statusline = { statusline = { set_vim_settings = false; };
set_vim_settings = false; comment = { };
}; notify = { };
comment = {}; };
notify = {};
};
}; };
telescope = { telescope = {
enable = true; enable = true;
extensions = { extensions = {
fzf-native = { fzf-native = {
enable = true; enable = true;
fuzzy = true; fuzzy = true;
overrideGenericSorter = true; overrideGenericSorter = true;
overrideFileSorter = true; overrideFileSorter = true;
caseMode = "smart_case"; caseMode = "smart_case";
}; };
ui-select.enable = true; ui-select.enable = true;
}; };
keymaps = { keymaps = {
"<leader>pf" = "find_files"; "<leader>pf" = "find_files";
"<C-p>" = "git_files"; "<C-p>" = "git_files";
@ -161,46 +161,43 @@
numhl = "", numhl = "",
}) })
end end
sign_define({ name = "DiagnosticSignError", text = "E" }) sign_define({ name = "DiagnosticSignError", text = "E" })
sign_define({ name = "DiagnosticSignWarn", text = "W" }) sign_define({ name = "DiagnosticSignWarn", text = "W" })
sign_define({ name = "DiagnosticSignHint", text = "H" }) sign_define({ name = "DiagnosticSignHint", text = "H" })
sign_define({ name = "DiagnosticSignInfo", text = "I" }) sign_define({ name = "DiagnosticSignInfo", text = "I" })
''; '';
}; };
nvim-cmp = { nvim-cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
sources = [ sources =
{name = "nvim_lsp";} [ { name = "nvim_lsp"; } { name = "path"; } { name = "snippy"; } ];
{name = "path";}
{name = "snippy";}
];
snippet.expand = "snippy"; snippet.expand = "snippy";
mapping = { mapping = {
"<C-l>" = "cmp.mapping.confirm({ select = false })"; "<C-l>" = "cmp.mapping.confirm({ select = false })";
"<C-j>" = { "<C-j>" = {
action = '' action = ''
function(fallback) function(fallback)
if cmp.visible then if cmp.visible then
cmp.select_next_item() cmp.select_next_item()
else else
fallback() fallback()
end end
end end
''; '';
modes = [ "i" "s" ]; modes = [ "i" "s" ];
}; };
"<C-k>" = { "<C-k>" = {
action = '' action = ''
function(fallback) function(fallback)
if cmp.visible then if cmp.visible then
cmp.select_prev_item() cmp.select_prev_item()
else else
fallback() fallback()
end end
end end
''; '';
modes = [ "i" "s" ]; modes = [ "i" "s" ];
}; };
@ -216,8 +213,6 @@
keywords = [ "bold" ]; keywords = [ "bold" ];
}; };
}; };
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [ vim-snippets ];
vim-snippets
];
}; };
} }

View File

@ -71,6 +71,9 @@
settings = { General = { InputMethod = ""; }; }; settings = { General = { InputMethod = ""; }; };
}; };
# Set default sddm session to plasma wayland
services.xserver.displayManager.defaultSession = "plasmawayland";
# Setup plasma with excluding a couple unnecesarry packages # Setup plasma with excluding a couple unnecesarry packages
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
environment.plasma5.excludePackages = with pkgs.libsForQt5; [ environment.plasma5.excludePackages = with pkgs.libsForQt5; [
@ -112,8 +115,11 @@
# Open Tablet Driver setup # Open Tablet Driver setup
hardware.opentabletdriver.enable = true; hardware.opentabletdriver.enable = true;
# load amdgpu at boot
boot.initrd.kernelModules = [ "amdgpu" ];
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
# Steam settings # Steam settings
programs.steam = { programs.steam = {