From f39de85d57ab61f62d044c817980aed816bbb446 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Fri, 26 Dec 2025 23:02:04 +0100 Subject: [PATCH] Added Nixvim --- darwin/default.nix | 3 +- darwin/settings.nix | 21 ++++ flake.lock | 41 +++++++- flake.nix | 4 + home/catppuccin.nix | 6 ++ home/default.nix | 4 +- home/neovim/alpha.nix | 158 ++++++++++++++++++++++++++++++ home/neovim/catppuccin.nix | 34 +++++++ home/neovim/conform.nix | 34 +++++++ home/neovim/default.nix | 94 ++++++++++++++++-- home/neovim/lint.nix | 42 ++++++++ home/neovim/lsp.nix | 91 +++++++++++++++++ home/neovim/lualine.nix | 22 +++++ home/neovim/telescope.nix | 27 +++++ home/neovim/toggleterm.nix | 64 ++++++++++++ home/neovim/treesitter.nix | 24 +++++ home/neovim/tresitter.nix | 5 - home/neovim/yazi.nix | 37 +++++++ home/shell.nix | 31 +++++- hosts/cyper-mac/configuration.nix | 2 +- 20 files changed, 722 insertions(+), 22 deletions(-) create mode 100644 home/catppuccin.nix create mode 100644 home/neovim/alpha.nix create mode 100644 home/neovim/catppuccin.nix create mode 100644 home/neovim/conform.nix create mode 100644 home/neovim/lint.nix create mode 100644 home/neovim/lsp.nix create mode 100644 home/neovim/lualine.nix create mode 100644 home/neovim/telescope.nix create mode 100644 home/neovim/toggleterm.nix create mode 100644 home/neovim/treesitter.nix delete mode 100644 home/neovim/tresitter.nix create mode 100644 home/neovim/yazi.nix diff --git a/darwin/default.nix b/darwin/default.nix index d5a8426..fd08254 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -7,10 +7,11 @@ }: { imports = [ -# ./homebrew.nix + # ./homebrew.nix ./settings.nix inputs.home-manager.darwinModules.home-manager inputs.nix-homebrew.darwinModules.nix-homebrew + # inputs.catppuccin.nixosModules.catppuccin ]; # nix config diff --git a/darwin/settings.nix b/darwin/settings.nix index b645372..237483e 100644 --- a/darwin/settings.nix +++ b/darwin/settings.nix @@ -11,6 +11,27 @@ startup.chime = false; defaults = { + ActivityMonitor = { + IconType = 5; + OpenMainWindow = true; + ShowCategory = 101; + }; + + dock = { + enable-spring-load-actions-on-all-items = true; + appswitcher-all-displays = false; + autohide = false; + launchanim = true; + mru-spaces = false; + orientation = "left"; + persistent-apps = [ + { app = "/Users/phil/Applications/Home Manager Apps/kitty.app"; } + { app = "/Applications/Launchpad.app"; } # Doenst Work? + ]; + show-recents = false; + mineffect = "genie"; + }; + loginwindow = { GuestEnabled = false; DisableConsoleAccess = true; diff --git a/flake.lock b/flake.lock index c970d17..639784f 100644 --- a/flake.lock +++ b/flake.lock @@ -17,6 +17,24 @@ "type": "github" } }, + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1765990358, + "narHash": "sha256-l8x0gU8mnYaGMl+gWrsSHKBJlZWD8KXJfHTkRlFiPI0=", + "owner": "catppuccin", + "repo": "nix", + "rev": "de1b60ca45a578f59f7d84c8d338b346017b2161", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -98,6 +116,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1763966396, + "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1751949589, "narHash": "sha256-mgFxAPLWw0Kq+C8P3dRrZrOYEQXOtKuYVlo9xvPntt8=", @@ -113,7 +147,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1766653575, "narHash": "sha256-TPgxCS7+hWc4kPhzkU5dD2M5UuPhLuuaMNZ/IpwKQvI=", @@ -132,7 +166,7 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "systems": "systems" }, "locked": { @@ -151,10 +185,11 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "darwin": "darwin", "home-manager": "home-manager", "nix-homebrew": "nix-homebrew", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim" } }, diff --git a/flake.nix b/flake.nix index 4f8d5ce..d8da914 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,9 @@ # declarative Neovim nixvim.url = "github:nix-community/nixvim"; + + # declarative Themeing + catppuccin.url = "github:catppuccin/nix"; }; outputs = @@ -27,6 +30,7 @@ home-manager, nix-homebrew, nixvim, + catppuccin, ... }@inputs: let diff --git a/home/catppuccin.nix b/home/catppuccin.nix new file mode 100644 index 0000000..5c0c6c4 --- /dev/null +++ b/home/catppuccin.nix @@ -0,0 +1,6 @@ +_: { + catppuccin = { + enable = false; + flavor = "mocha"; + }; +} diff --git a/home/default.nix b/home/default.nix index 0b1134f..7157fc2 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,11 +1,13 @@ { primaryUser, inputs, ... }: { imports = [ - inputs.nixvim.homeManagerModules.nixvim + inputs.nixvim.homeModules.nixvim + # inputs.catppuccin.homeModules.catppuccin ./neovim ./packages.nix ./git.nix ./shell.nix + # ./catppuccin.nix ]; home = { diff --git a/home/neovim/alpha.nix b/home/neovim/alpha.nix new file mode 100644 index 0000000..bfdf179 --- /dev/null +++ b/home/neovim/alpha.nix @@ -0,0 +1,158 @@ +{ pkgs, ... }: +{ + # Alpha: Start screen/dashboard for Neovim + # Shows a custom ASCII art header and quick action buttons on startup. + programs.nixvim.plugins.alpha = { + enable = true; + settings.layout = [ + { + type = "padding"; + val = 2; + } + { + type = "text"; + val = [ + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿" + "⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿" + "⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽" + "⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿" + "⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿" + "⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿" + "⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿" + "⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿" + "⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿" + "⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿" + "⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿" + "⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿" + "⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾" + "⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿" + "⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿" + "⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿" + "⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿" + "⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿" + "⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛" + ]; + opts = { + position = "center"; + hl = "Type"; + }; + } + { + type = "padding"; + val = 2; + } + { + type = "group"; + val = [ + { + type = "button"; + val = "[+] New file"; + on_press.__raw = "function() vim.cmd[[ene]] vim.cmd[[startinsert]] end"; + opts = { + keymap = [ + "n" + "e" + ":ene startinsert " + { } + ]; + shortcut = "e"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "button"; + val = "[?] Find file"; + on_press.__raw = "function() vim.cmd[[Telescope find_files]] end"; + opts = { + keymap = [ + "n" + "f" + ":Telescope find_files " + { } + ]; + shortcut = "f"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "button"; + val = "[~] Recent files"; + on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end"; + opts = { + keymap = [ + "n" + "r" + ":Telescope oldfiles " + { } + ]; + shortcut = "r"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "button"; + val = "[Y] Yazi"; + on_press.__raw = "function() vim.cmd[[Yazi]] end"; + opts = { + keymap = [ + "n" + "y" + ":Yazi" + { } + ]; + shortcut = "y"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "button"; + val = "[X] Quit"; + on_press.__raw = "function() vim.cmd[[qa]] end"; + opts = { + keymap = [ + "n" + "q" + ":qa" + { } + ]; + shortcut = "q"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + ]; + } + { + type = "padding"; + val = 2; + } + { + type = "text"; + val = "Circuits hum in anticipation of your will."; + opts = { + position = "center"; + hl = "Comment"; + }; + } + ]; + }; +} diff --git a/home/neovim/catppuccin.nix b/home/neovim/catppuccin.nix new file mode 100644 index 0000000..98ba46c --- /dev/null +++ b/home/neovim/catppuccin.nix @@ -0,0 +1,34 @@ +{ pkgs, ... }: +{ + # Catppuccin: Soothing pastel theme for Neovim + # Provides consistent theming across plugins with transparency support. + programs.nixvim = { + colorschemes.catppuccin = { + enable = true; + settings = { + flavour = "mocha"; + transparent_background = true; + term_colors = true; + integrations = { + treesitter = true; + cmp = true; + gitsigns = true; + telescope = { + enabled = true; + }; + notify = true; + mini = { + enabled = true; + }; + }; + }; + }; + + # Custom highlight overrides + extraConfigLua = '' + local colors = require("catppuccin.palettes").get_palette("mocha") + vim.api.nvim_set_hl(0, "LineNr", { fg = colors.text, bg = "NONE" }) + vim.api.nvim_set_hl(0, "CursorLineNr", { fg = colors.pink, bg = "NONE", bold = true }) + ''; + }; +} diff --git a/home/neovim/conform.nix b/home/neovim/conform.nix new file mode 100644 index 0000000..d1c4368 --- /dev/null +++ b/home/neovim/conform.nix @@ -0,0 +1,34 @@ +{ pkgs, ... }: +{ + # Conform: Code formatter that runs external formatting tools + # Automatically formats code on save for consistent style. + programs.nixvim = { + plugins.conform-nvim = { + enable = true; + + settings = { + formatters_by_ft = { + lua = [ "stylua" ]; + nix = [ "nixfmt" ]; + python = [ "black" ]; + rust = [ "rustfmt" ]; + rasi = [ "prettierd" ]; + }; + + format_on_save = { + timeout_ms = 500; + lsp_fallback = true; + }; + }; + }; + + # Install formatters + extraPackages = with pkgs; [ + stylua + nixfmt-classic + black + rustfmt + prettierd + ]; + }; +} diff --git a/home/neovim/default.nix b/home/neovim/default.nix index c562dd6..cf7df19 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -1,13 +1,91 @@ -{...}: +{ ... }: { -imports = [ -./treesitter.nix -]; + imports = [ + ./alpha.nix + ./treesitter.nix + ./lint.nix + ./lsp.nix + ./conform.nix + ./lualine.nix + ./yazi.nix + ./toggleterm.nix + ./telescope.nix + ./catppuccin.nix + ]; + programs.nixvim = { + enable = true; + defaultEditor = true; -programs.nixvim = { -enable = true; -defaultEditor = true; -}; + # Leader key + globals.mapleader = " "; + + plugins.web-devicons.enable = true; + + opts = { +number = true; # Show line numbers +cursorline = true; # Highlight current line +showmode = true; # already in statusline +hlsearch = true; # Highlight search result +incsearch = true; # Incremental Search +tabstop = 4; +termguicolors = true; # Enable 24-bit colormode + }; + + # Clipboard keymaps - yank to system clipboard + keymaps = [ + # Yank operations + { + mode = "n"; + key = "y"; + action = "\"+y"; + options.desc = "Yank to clipboard"; + } + { + mode = "v"; + key = "y"; + action = "\"+y"; + options.desc = "Yank to clipboard"; + } + { + mode = "n"; + key = "Y"; + action = "\"+Y"; + options.desc = "Yank line to clipboard"; + } + # Delete operations + { + mode = "n"; + key = "d"; + action = "\"+d"; + options.desc = "Delete to clipboard"; + } + { + mode = "v"; + key = "d"; + action = "\"+d"; + options.desc = "Delete to clipboard"; + } + { + mode = "n"; + key = "D"; + action = "\"+D"; + options.desc = "Delete line to clipboard"; + } + # Paste operations + { + mode = "n"; + key = "p"; + action = "\"+p"; + options.desc = "Paste from clipboard"; + } + { + mode = "v"; + key = "p"; + action = "\"+p"; + options.desc = "Paste from clipboard"; + } + ]; + }; } diff --git a/home/neovim/lint.nix b/home/neovim/lint.nix new file mode 100644 index 0000000..ac178c6 --- /dev/null +++ b/home/neovim/lint.nix @@ -0,0 +1,42 @@ +{ pkgs, ... }: +{ + # nvim-lint: Asynchronous linter that runs external linting tools + # to find errors and style issues without blocking the editor. + # Runs automatically after saving files. + programs.nixvim = { + plugins.lint = { + enable = true; + + # Configure linters for each filetype + lintersByFt = { + lua = [ "luacheck" ]; + nix = [ "statix" ]; # Nix static analyzer + python = [ "ruff" ]; + javascript = [ "eslint" ]; + rust = [ "clippy" ]; + # rasi has no common linter + }; + + # Trigger linting after saving a file + autoCmd = { + event = [ "BufWritePost" ]; + callback = { + __raw = '' + function() + require('lint').try_lint() + end + ''; + }; + }; + }; + + # Install linter binaries + extraPackages = with pkgs; [ + lua54Packages.luacheck + statix + ruff + nodePackages.eslint + clippy + ]; + }; +} diff --git a/home/neovim/lsp.nix b/home/neovim/lsp.nix new file mode 100644 index 0000000..3fe2059 --- /dev/null +++ b/home/neovim/lsp.nix @@ -0,0 +1,91 @@ +{ pkgs, ... }: +{ + # LSP configuration: Language Server Protocol provides IDE features + # like autocomplete, go-to-definition, diagnostics, and more. + programs.nixvim = { + plugins = { + # LSP configuration + lsp = { + enable = true; + + # Language servers for each language + servers = { + lua_ls = { + enable = true; + settings = { + Lua = { + runtime.version = "LuaJIT"; + diagnostics.globals = [ "vim" ]; + workspace.library = [ ]; # Populated by nixvim + telemetry.enable = false; + }; + }; + }; + + nil_ls.enable = true; # Nix language server + rust_analyzer = { + enable = true; # Rust language server + installCargo = true; + installRustc = true; + }; + pylsp.enable = true; # Python language server + }; + + # Keymaps for LSP actions + keymaps = { + diagnostic = { + "e" = "open_float"; + "[d" = "goto_prev"; + "]d" = "goto_next"; + }; + lspBuf = { + "gd" = "definition"; + "K" = "hover"; + "rn" = "rename"; + "ca" = "code_action"; + }; + }; + }; + + # Autocompletion + cmp = { + enable = true; + autoEnableSources = true; + + settings = { + snippet.expand = '' + function(args) + require('luasnip').lsp_expand(args.body) + end + ''; + + mapping = { + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.confirm({ select = true })"; + }; + + sources = [ + { name = "nvim_lsp"; } + { name = "luasnip"; } + { name = "buffer"; } + { name = "path"; } + ]; + }; + }; + + # Snippet engine (required for completion) + luasnip.enable = true; + }; + + # Install LSP servers + extraPackages = with pkgs; [ + lua-language-server + nil + rust-analyzer + python311Packages.python-lsp-server + ]; + }; +} diff --git a/home/neovim/lualine.nix b/home/neovim/lualine.nix new file mode 100644 index 0000000..4f85435 --- /dev/null +++ b/home/neovim/lualine.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: +{ + # Lualine: Fast and customizable statusline for Neovim + # Displays file info, git status, diagnostics, and mode at the bottom of the editor. + programs.nixvim.plugins.lualine = { + enable = true; + + settings = { + options = { + theme = "catppuccin"; + component_separators = { + left = "|"; + right = "|"; + }; + section_separators = { + left = ""; + right = ""; + }; + }; + }; + }; +} diff --git a/home/neovim/telescope.nix b/home/neovim/telescope.nix new file mode 100644 index 0000000..1d0e330 --- /dev/null +++ b/home/neovim/telescope.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + # Telescope: Fuzzy finder for files, buffers, grep, and more + # Provides fast search and navigation throughout your project. + programs.nixvim.plugins.telescope = { + enable = true; + + keymaps = { + "ff" = { + action = "find_files"; + options.desc = "Telescope find files"; + }; + "fg" = { + action = "live_grep"; + options.desc = "Telescope live grep"; + }; + "fb" = { + action = "buffers"; + options.desc = "Telescope buffers"; + }; + "fh" = { + action = "help_tags"; + options.desc = "Telescope help tags"; + }; + }; + }; +} diff --git a/home/neovim/toggleterm.nix b/home/neovim/toggleterm.nix new file mode 100644 index 0000000..3eca8a4 --- /dev/null +++ b/home/neovim/toggleterm.nix @@ -0,0 +1,64 @@ +{ pkgs, ... }: +{ + # ToggleTerm: Terminal emulator inside Neovim + # Provides floating, horizontal, and vertical terminal windows. + programs.nixvim.plugins.toggleterm = { + enable = true; + + settings = { + size = 20; + open_mapping = "[[]]"; + direction = "float"; + float_opts = { + border = "single"; + width = 200; + height = 40; + }; + }; + }; + + programs.nixvim.keymaps = [ + { + mode = "n"; + key = "h"; + action.__raw = '' + function() + require("toggleterm").toggle(1, 10, vim.loop.cwd(), "horizontal") + end + ''; + options.desc = "Toggle terminal (horizontal)"; + } + { + mode = "n"; + key = "v"; + action.__raw = '' + function() + require("toggleterm").toggle(2, 60, vim.loop.cwd(), "vertical") + end + ''; + options.desc = "Toggle terminal (vertical)"; + } + { + mode = "n"; + key = "ft"; + action.__raw = '' + function() + require("toggleterm").toggle(3, 20, vim.loop.cwd(), "float") + end + ''; + options.desc = "Toggle terminal (float)"; + } + { + mode = "t"; + key = ""; + action = "ToggleTerm"; + options.desc = "Toggle terminal"; + } + { + mode = "t"; + key = ""; + action = "v"; + options.desc = "Exit terminal and enter visual mode"; + } + ]; +} diff --git a/home/neovim/treesitter.nix b/home/neovim/treesitter.nix new file mode 100644 index 0000000..58e174a --- /dev/null +++ b/home/neovim/treesitter.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + + # Install language parsers declaratively + # Syntax Highlighting + programs.nixvim.plugins.treesitter = { + enable = true; + grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + lua + nix + python + javascript + rust + rasi + ]; + + settings = { + highlight = { + enable = true; + additional_vim_regex_highlighting = false; + }; + }; + }; +} diff --git a/home/neovim/tresitter.nix b/home/neovim/tresitter.nix deleted file mode 100644 index 678b37f..0000000 --- a/home/neovim/tresitter.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ -programs.nixvim.plugins.treesitter = { -enable = true; -}; -} diff --git a/home/neovim/yazi.nix b/home/neovim/yazi.nix new file mode 100644 index 0000000..bd00bd6 --- /dev/null +++ b/home/neovim/yazi.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: +{ + programs.nixvim = { + yazi = { + enable = true; + settings = { + open_for_directories = true; + }; + }; + + keymaps = [ + { + mode = "n"; + key = "fy"; + action.__raw = '' + function() + require('yazi').yazi(nil, vim.loop.cwd()) + end + ''; + options.desc = "Open Yazi file manager"; + } + { + mode = "n"; + key = "fd"; + action.__raw = '' + function() + require('yazi').yazi(nil, vim.fn.expand("%:p:h")) + end + ''; + options.desc = "Open Yazi in current file directory"; + } + ]; + + extraPackages = with pkgs; [ yazi ]; + }; + +} diff --git a/home/shell.nix b/home/shell.nix index fd3d3a4..5f13447 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -1,4 +1,17 @@ -_: { +{pkgs, ...}: { + home.packages = with pkgs; [ + eza # ls replacement + fzf # FuzzyFinder + tdf # terminal pdf viewer + jq # json parser + tree + + # Fun stuff + lolcat + cmatrix + ]; + + programs.kitty = { enable = true; themeFile = "Catppuccin-Mocha"; @@ -9,7 +22,7 @@ _: { enable_audio_bell = false; mouse_hide_wait = 3.0; window_padding_width = 10; - + background_opacity = 0.8; background_blur = 5; @@ -19,7 +32,8 @@ _: { tab_powerline_style = "slanted"; tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}"; - symbol_map = let + symbol_map = + let mappings = [ "U+23FB-U+23FE" "U+2B58" @@ -45,6 +59,17 @@ _: { }; }; + programs.yazi = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + + settings = { + ration = [1 3 4]; + }; + }; + programs.zsh = { enable = true; enableCompletion = true; diff --git a/hosts/cyper-mac/configuration.nix b/hosts/cyper-mac/configuration.nix index c1d9b7f..6de0e5a 100644 --- a/hosts/cyper-mac/configuration.nix +++ b/hosts/cyper-mac/configuration.nix @@ -8,7 +8,7 @@ # host-specific homebrew casks #homebrew.casks = [ - # "slack" + # "slack" #]; # host-specific home-manager configuration