update hyprland config (not functional yet)

This commit is contained in:
2026-08-09 16:49:05 +02:00
parent 8e8c291863
commit e406f987d1
14 changed files with 221 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./neovim.nix
];
}
+75
View File
@@ -0,0 +1,75 @@
{
programs.nixvim = {
globals = {
mapleader = " ";
};
keymaps = [
{
action = "<cmd>lua Snacks.explorer.open()<CR>";
key = "<leader>e";
}
{
action = "<cmd>lua Snacks.bufdelete()<CR>";
key = "<C-q>";
}
{
mode = [
"n"
"x"
"o"
];
action = ''<cmd>lua require("flash").jump()<CR>'';
key = "s";
}
{
action = "<cmd>BufferLineCycleNext<CR>";
key = "<tab>";
}
{
action = "<cmd>BufferLineCyclePrev<CR>";
key = "<S-tab>";
}
{
mode = [ "x" ];
action = "<gv";
key = "<";
}
{
mode = [ "x" ];
action = ">gv";
key = ">";
}
{
mode = [ "n" ];
action = ''"_d'';
key = "d";
}
{
mode = [ "n" ];
action = ''"_dd'';
key = "dd";
}
{
mode = [ "v" ];
action = ''"_d'';
key = "d";
}
{
mode = [ "n" ];
action = "<cmd>Telescope live_grep<CR>";
key = "<leader>rg";
}
{
mode = [ "n" ];
action = "<cmd>Telescope find_files<CR>";
key = "<leader>ff";
}
{
mode = [ "n" ];
action = "<cmd>:lua vim.diagnostic.open_float<CR>";
key = "<leader>k";
}
];
};
}
+30
View File
@@ -0,0 +1,30 @@
{
programs.nixvim.lsp = {
servers = {
lua_ls.enable = true;
nixd = {
enable = true;
config = {
settings = {
nixd = {
nixpkgs = {
expr = ''import (builtins.getFlake "/home/user/nix-config").inputs.nixpkgs { }'';
};
formatting = {
command = [ "nixfmt" ];
};
options = {
nixos = {
expr = ''(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options'';
};
home_manager = {
expr = ''(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options.home-manager.users.type.getSubOptions []'';
};
};
};
};
};
};
};
};
}
+138
View File
@@ -0,0 +1,138 @@
{
nixvim,
pkgs,
...
}:
{
imports = [
nixvim.nixosModules.nixvim
./plugins
./keymaps.nix
./lsp.nix
];
programs.nixvim = {
enable = false;
defaultEditor = true;
clipboard.register = "unnamedplus";
opts = {
number = true;
relativenumber = true;
expandtab = true;
shiftwidth = 2;
smartindent = true;
tabstop = 2;
softtabstop = 2;
showmode = false;
fillchars.eob = " ";
ignorecase = true;
smartcase = true;
mouse = "a";
};
extraPlugins = with pkgs.vimPlugins; [
boole-nvim
tokyodark-nvim
];
extraConfigLua = ''
require('boole').setup({
mappings = {
-- increment = '<C-a>',
decrement = '<C-x>'
},
allow_caps_additions = {
{'enable', 'disable'},
{'true', 'false'}
}
})
require('tokyodark').setup({
gamma = 0.9,
transparent_background = true,
terminal_colors = false,
custom_highlights = function(_, palette)
return {
["@variable"] = {
fg = "#A0A8CD",
},
}
end,
})
vim.cmd.colorscheme("tokyodark")
'';
plugins = {
lualine.enable = true;
bufferline = {
enable = true;
settings = {
options = {
show_buffer_close_icons = false;
show_close_icon = false;
themable = true;
separator_style = "thin";
indicator.style = "none";
always_show_bufferline = false;
color_icons = true;
show_buffer_icons = true;
};
# highlights = {
# fill.bg = "NONE";
# separator.fg = "NONE";
# separator_selected.fg = "NONE";
# separator_visible.fg = "NONE";
# };
};
};
yazi.enable = true;
cord = {
enable = true;
settings.display.theme = "atom";
};
neoscroll.enable = true;
telescope = {
enable = true;
enabledExtensions = [ "persisted" ];
};
which-key.enable = true;
flash.enable = true;
lsp.enable = true;
fugitive.enable = true;
treesitter = {
enable = true;
highlight.enable = true;
indent.enable = true;
settings.ensure_installed = "all";
};
gitsigns.enable = true;
nvim-autopairs = {
enable = true;
};
cmp = {
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
persisted.enable = true;
render-markdown.enable = true;
oil = {
enable = true;
settings = {
view_options = {
show_hidden = true;
};
};
};
colorizer.enable = true;
};
};
}
@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
programs.nixvim.extraPackages = with pkgs; [
stylua
nixfmt
];
programs.nixvim.plugins = {
conform-nvim = {
enable = true;
settings = {
format_on_save = ''
function(bufnr)
-- Disable "format_on_save lsp_fallback" for lanuages that don't
-- have a well standardized coding style. You can add additional
-- lanuages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
if disable_filetypes[vim.bo[bufnr].filetype] then
return nil
else
return {
timeout_ms = 500,
lsp_format = "fallback",
}
end
end
'';
formatters_by_ft = {
lua = [ "stylua" ];
nix = [ "nixfmt" ];
};
};
};
};
}
@@ -0,0 +1,6 @@
{
imports = [
./snacks.nix
./conform.nix
];
}
@@ -0,0 +1,81 @@
{
programs.nixvim.plugins = {
snacks = {
enable = true;
settings = {
bigfile.enabled = true;
dashboard = {
enabled = true;
preset = {
keys = [
{
icon = " ";
key = "f";
desc = "Find File";
action = ":lua Snacks.dashboard.pick('files')";
}
{
icon = " ";
key = "n";
desc = "New File";
action = ":ene | startinsert";
}
{
icon = " ";
key = "g";
desc = "Find Text";
action = ":lua Snacks.dashboard.pick('live_grep')";
}
{
icon = " ";
key = "r";
desc = "Recent Files";
action = ":lua Snacks.dashboard.pick('oldfiles')";
}
{
icon = " ";
key = "c";
desc = "Config";
action = ":lua require('telescope.builtin').find_files({ cwd = '~/nix-config/modules/programs/neovim' })";
}
{
icon = " ";
key = "s";
desc = "Restore Session";
action = ":Telescope persisted";
}
{
icon = " ";
key = "q";
desc = "Quit";
action = ":qa";
}
];
};
sections = [
{
section = "header";
gap = 2;
}
{
section = "keys";
gap = 1;
padding = 1;
}
];
};
explorer = {
enabled = true;
auto_close = true;
};
indent.enabled = false;
input.enabled = true;
picker.enabled = true;
notifier.enabled = true;
quickfile.enabled = true;
statuscolumn.enabled = true;
words.enabled = true;
};
};
};
}