diff --git a/flake.nix b/flake.nix index 2f79251d..3cb3b4b9 100644 --- a/flake.nix +++ b/flake.nix @@ -230,11 +230,6 @@ hyprgrass.url = "github:horriblename/hyprgrass/427690aec574fec75f5b7b800ac4a0b4c8e4b1d5"; hyprgrass.inputs.hyprland.follows = "hyprland"; - nvchad = { - url = "github:NvChad/starter"; - flake = false; - }; - stylix.url = "github:danth/stylix"; emacs-overlay = { diff --git a/profiles/work/home.nix b/profiles/work/home.nix index 83370817..36f6e3b6 100644 --- a/profiles/work/home.nix +++ b/profiles/work/home.nix @@ -12,7 +12,6 @@ (./. + "../../../user/wm"+("/"+userSettings.wm+"/"+userSettings.wm)+".nix") # My window manager selected from flake ../../user/shell/sh.nix # My zsh and bash config ../../user/shell/cli-collection.nix # Useful CLI apps - ../../user/app/nvim/nvim.nix # My doom emacs config ../../user/app/emacs # Emacs config that I'm currently rebuilding ../../user/app/ranger/ranger.nix # My ranger file manager config ../../user/app/git/git.nix # My git config diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix index 0d19ab1f..6232d374 100644 --- a/system/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -82,10 +82,10 @@ }; boot.kernel.sysctl = { - "vm.swappiness" = 90; - "vm.vfs_cache_pressure" = 50; - "vm.dirty_background_ratio" = 2; - "vm.dirty_ratio" = 5; + "vm.swappiness" = 180; + "vm.vfs_cache_pressure" = 500; + "vm.dirty_background_ratio" = 4; + "vm.dirty_ratio" = 8; }; services.btrfs.autoScrub = { diff --git a/user/app/nvim/README.md b/user/app/nvim/README.md deleted file mode 100644 index dc0deaa4..00000000 --- a/user/app/nvim/README.md +++ /dev/null @@ -1,9 +0,0 @@ -**This repo is supposed to used as config by NvChad users!** - -- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. -- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` -- So you can delete the .git from this repo ( when you clone it locally ) or fork it :) - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/user/app/nvim/init.lua b/user/app/nvim/init.lua deleted file mode 100644 index 59737fc4..00000000 --- a/user/app/nvim/init.lua +++ /dev/null @@ -1,98 +0,0 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" -vim.g.mapleader = " " - -if vim.g.neovide then - -- Helper function for transparency formatting - local alpha = function() - return string.format("%x", math.floor(255 * vim.g.transparency or 0.8)) - end - vim.g.transparency = 0 - vim.g.neovide_background_color = vim.g.neovide_background_color .. alpha() - vim.g.neovide_transparency = 0.8 - vim.g.neovide_floating_blur_amount_x = 8.0 - vim.g.neovide_floating_blur_amount_y = 8.0 - vim.g.neovide_refresh_rate = 120 - vim.g.neovide_cursor_vfx_mode = "pixiedust" - vim.g.neovide_text_gamma = 0.8 - vim.g.neovide_text_contrast = 0.1 - vim.opt.termguicolors = true - vim.g.neovide_scale_factor = 1.0 -end - -vim.o.conceallevel = 2 - -vim.api.nvim_create_user_command('W', 'execute "silent! write !sudo tee % >/dev/null" edit', { nargs = 0}) - - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, -}, lazy_config) - -require("workspaces").setup({ - hooks = { - open = { "Telescope find_files" }, - } -}) - --- You dont need to set any of these options. These are the default ones. Only --- the loading is important -require('telescope').setup { - defaults = { - winblend = 80, - }, - pickers = { - find_files = { - }, - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = true, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - workspaces = { - -- keep insert mode after selection in the picker, default is false - keep_insert = true, - -- Highlight group used for the path in the picker, default is "String" - path_hl = "String" - } - } -} --- To get fzf loaded and working with telescope, you need to call --- load_extension, somewhere after setup function: -require('telescope').load_extension('fzf') -require('telescope').load_extension('project') -require('telescope').load_extension('workspaces') - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "options" -require "nvchad.autocmds" - -vim.schedule(function() - require "mappings" -end) diff --git a/user/app/nvim/lua/chadrc.lua b/user/app/nvim/lua/chadrc.lua deleted file mode 100644 index 2f5dec3f..00000000 --- a/user/app/nvim/lua/chadrc.lua +++ /dev/null @@ -1,33 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua --- Please read that file to know all available options :( - ----@type ChadrcConfig -local M = {} - -M.base46 = { - theme = "stylix", - - -- hl_override = { - -- Comment = { italic = true }, - -- ["@comment"] = { italic = true }, - -- }, -} - -M.ui = { - theme = "stylix", -} - -M.nvdash = { - load_on_startup = true, - buttons = { - { txt = " Find File", keys = "Spc .", cmd = "Telescope find_files" }, - { txt = "󰙅 Nvimtree", keys = "SPC e", cmd = "NvimTreeToggle" }, - { txt = " Projects ", keys = "Spc p p", cmd = "Telescope workspaces" }, - { txt = "󰯌 Vsplit ", keys = "Spc w v", cmd = "vsplit" }, - { txt = "󰯋 Split ", keys = "Spc w s", cmd = "split" }, - { txt = "󰋗 Help", keys = "Spc c h", cmd = "NvCheatsheet" }, - }, - } - -return M diff --git a/user/app/nvim/lua/configs/conform.lua b/user/app/nvim/lua/configs/conform.lua deleted file mode 100644 index 35ba6cf7..00000000 --- a/user/app/nvim/lua/configs/conform.lua +++ /dev/null @@ -1,15 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - -- css = { "prettier" }, - -- html = { "prettier" }, - }, - - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, -} - -return options diff --git a/user/app/nvim/lua/configs/lazy.lua b/user/app/nvim/lua/configs/lazy.lua deleted file mode 100644 index cd170bd3..00000000 --- a/user/app/nvim/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/user/app/nvim/lua/configs/lspconfig.lua b/user/app/nvim/lua/configs/lspconfig.lua deleted file mode 100644 index ea9e8121..00000000 --- a/user/app/nvim/lua/configs/lspconfig.lua +++ /dev/null @@ -1,27 +0,0 @@ --- load defaults i.e lua_lsp -require("nvchad.configs.lspconfig").defaults() - -local lspconfig = require "lspconfig" - --- EXAMPLE -local servers = { "html", "cssls", "nil_ls", "marksman", "clangd", "pylsp", "ts_ls", "java_language_server", "dockerls", "docker_compose_language_service", "jsonls", "kotlin_language_server", "bashls", "yamlls", "sqls" } -local nvlsp = require "nvchad.configs.lspconfig" - --- lsps with default config -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - } -end -lspconfig.gdscript.setup { - cmd = { "ncat", "localhost", "6005"} -} - --- configuring single server, example: typescript --- lspconfig.ts_ls.setup { --- on_attach = nvlsp.on_attach, --- on_init = nvlsp.on_init, --- capabilities = nvlsp.capabilities, --- } diff --git a/user/app/nvim/lua/mappings.lua b/user/app/nvim/lua/mappings.lua deleted file mode 100644 index c0f96565..00000000 --- a/user/app/nvim/lua/mappings.lua +++ /dev/null @@ -1,47 +0,0 @@ -require "nvchad.mappings" - --- add yours here - -local map = vim.keymap.set -local builtin = require("telescope.builtin") -local utils = require("telescope.utils") -local change_scale_factor = function(delta) - vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta -end - -vim.keymap.set("n", "", function() - change_scale_factor(1.25) -end) -vim.keymap.set("n", "", function() - change_scale_factor(1/1.25) -end) - -map("n", ";", ":", { desc = "CMD enter command mode" }) -map({"n", "t", "v", "i"}, "", ":", { desc = "CMD enter command mode" }) -map({"n", "t", "v", "i"}, "", "", { desc = "up" }) -map({"n", "t", "v", "i"}, "", "", { desc = "down" }) -map({"n", "t", "v", "i"}, "", "h", { desc = "switch window left" }) -map({"n", "t", "v", "i"}, "", "l", { desc = "switch window right" }) -map({"n", "t", "v", "i"}, "", "j", { desc = "switch window down" }) -map({"n", "t", "v", "i"}, "", "k", { desc = "switch window up" }) -map("n", ".", "Telescope find_files", { desc = "telescope find files" }) -map("n", "/", "Telescope live_grep", { desc = "telescope live grep" }) -map("n", "gg", "Neogit", { desc = "Neogit status buffer" }) -map("n", "c", "gcc", { desc = "Toggle Comment", remap = true }) -map("v", "c", "gc", { desc = "Toggle comment", remap = true }) -map("n", "pp", "Telescope workspaces", { desc = "telescope workspaces" }) -map("n", "pf", "Telescope find_files", { desc = "telescope find files" }) -map("n", "", "q", { desc = "quit" }) -map("n", "wd>", "q", { desc = "quit" }) -map("n", "ws", "split", { desc = "horizontal split" }) -map("n", "wS", "split", { desc = "horizontal split" }) -map("n", "wv", "vsplit", { desc = "vertical split" }) -map("n", "wV", "vsplit", { desc = "vertical split" }) -map("n", "", "edit #", { desc = "edit previous" }) -map({ "n", "t", "i", "v" }, "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) -map({ "n", "t", "i", "v" }, "", function() - require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } -end, { desc = "terminal toggleable horizontal term" }) -map("i", "jk", "") - --- map({ "n", "i", "v" }, "", " w ") diff --git a/user/app/nvim/lua/options.lua b/user/app/nvim/lua/options.lua deleted file mode 100644 index 738f20b2..00000000 --- a/user/app/nvim/lua/options.lua +++ /dev/null @@ -1,6 +0,0 @@ -require "nvchad.options" - --- add yours here! - --- local o = vim.o --- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/user/app/nvim/lua/plugins/init.lua b/user/app/nvim/lua/plugins/init.lua deleted file mode 100644 index 9af253e9..00000000 --- a/user/app/nvim/lua/plugins/init.lua +++ /dev/null @@ -1,52 +0,0 @@ -return { - { - "stevearc/conform.nvim", - -- event = 'BufWritePre', -- uncomment for format on save - opts = require "configs.conform", - }, - - -- These are some examples, uncomment them if you want to see them work! - { - "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, - }, - - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "vim", "lua", "vimdoc", - "html", "css", 'gdscript' - }, - }, - }, - - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make', lazy = false, }, - { 'nvim-telescope/telescope-project.nvim', lazy = false, }, - { 'natecraddock/workspaces.nvim', lazy = false, }, - { 'jghauser/follow-md-links.nvim', lazy = false, }, - - { - "NeogitOrg/neogit", - lazy = false, - dependencies = { - "nvim-lua/plenary.nvim", -- required - "sindrets/diffview.nvim", -- optional - Diff integration - - -- Only one of these is needed. - "nvim-telescope/telescope.nvim", -- optional - }, - config = true - }, - { - 'nvim-orgmode/orgmode', - event = 'VeryLazy', - ft = { 'org' }, - config = function() - -- Setup orgmode - require('orgmode').setup({}) - end, - }, -} diff --git a/user/app/nvim/lua/themes/stylix.lua.mustache b/user/app/nvim/lua/themes/stylix.lua.mustache deleted file mode 100644 index 585952dc..00000000 --- a/user/app/nvim/lua/themes/stylix.lua.mustache +++ /dev/null @@ -1,72 +0,0 @@ -local M = {} - -M.base_30 = { - white = "#{{base07-hex}}", - darker_black = "#{{base00-hex}}", - black = "#{{base00-hex}}", -- nvim bg - black2 = "#{{base01-hex}}", - one_bg = "#{{base01-hex}}", - one_bg2 = "#{{base02-hex}}", - one_bg3 = "#{{base03-hex}}", - grey = "#{{base04-hex}}", - grey_fg = "#{{base04-hex}}", - grey_fg2 = "#{{base05-hex}}", - light_grey = "#{{base06-hex}}", - red = "#{{base08-hex}}", - baby_pink = "#{{base08-hex}}", - pink = "#{{base08-hex}}", - line = "#{{base02-hex}}", -- for lines like vertsplit - green = "#{{base0B-hex}}", - vibrant_green = "#{{base0B-hex}}", - blue = "#{{base0D-hex}}", - nord_blue = "#{{base0D-hex}}", - yellow = "#{{base0A-hex}}", - sun = "#{{base0A-hex}}", - purple = "#{{base0E-hex}}", - dark_purple = "#{{base0E-hex}}", - teal = "#{{base0C-hex}}", - orange = "#{{base09-hex}}", - cyan = "#{{base0C-hex}}", - statusline_bg = "#{{base02-hex}}", - lightbg = "#{{base03-hex}}", - pmenu_bg = "#{{base0D-hex}}", - folder_bg = "#{{base05-hex}}", -} - -M.base_16 = { - base00 = "#{{base00-hex}}", - base01 = "#{{base01-hex}}", - base02 = "#{{base02-hex}}", - base03 = "#{{base03-hex}}", - base04 = "#{{base04-hex}}", - base05 = "#{{base05-hex}}", - base06 = "#{{base06-hex}}", - base07 = "#{{base07-hex}}", - base08 = "#{{base08-hex}}", - base09 = "#{{base09-hex}}", - base0A = "#{{base0A-hex}}", - base0B = "#{{base0B-hex}}", - base0C = "#{{base0C-hex}}", - base0D = "#{{base0D-hex}}", - base0E = "#{{base0E-hex}}", - base0F = "#{{base0F-hex}}", -} - -M.polish_hl = { - treesitter = { - luaTSField = { fg = M.base_16.base0D }, - ["@tag.delimiter"] = { fg = M.base_30.cyan }, - ["@function"] = { fg = M.base_30.orange }, - ["@string"] = { fg = M.base_16.base0F }, - ["@identifier"] = { fg = M.base_16.base0E }, - ["@variable.parameter"] = { fg = M.base_16.base0F }, - ["@constructor"] = { fg = M.base_16.base0A }, - ["@tag.attribute"] = { fg = M.base_30.orange }, - }, -} - -M = require("base46").override_theme(M, "stylix") - -M.type = "dark" - -return M diff --git a/user/app/nvim/nvim.nix b/user/app/nvim/nvim.nix deleted file mode 100644 index 6944c74d..00000000 --- a/user/app/nvim/nvim.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, pkgs, inputs, ... }: - -{ - home.packages = with pkgs; [ - neovim - neovim-remote - neovide - lua-language-server - vscode-langservers-extracted - nil - clang-tools - marksman - python311Packages.python-lsp-server - typescript-language-server - java-language-server - dockerfile-language-server-nodejs - docker-compose-language-service - kotlin-language-server - bash-language-server - yaml-language-server - sqls - nmap - ]; - programs.neovim = { - viAlias = true; - vimAlias = true; - }; - home.file.".config/nvim".source = ./.; - home.file.".config/nvim".recursive = true; - home.file.".config/nvim/lua/themes/stylix.lua".source = config.lib.stylix.colors { - template = builtins.readFile ./lua/themes/stylix.lua.mustache; - extension = ".lua"; - }; -}