From b3d37d7b2035f77c5cbe66fc532732991e2b7233 Mon Sep 17 00:00:00 2001 From: biscuit Date: Tue, 27 May 2025 17:22:13 -0500 Subject: [PATCH] test --- flake.nix | 11 ++- pkgs/neovim/default.nix | 180 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 184 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 8c5c339..808199b 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,9 @@ nixvim.url = "github:nix-community/nixvim"; nixvim.inputs.nixpkgs.follows = "nixpkgs"; # monolisa.inputs.nixpkgs.follows = "nixpkgs"; + + # fred-drake.url = "github:fred-drake/neovim"; + # fred-drake.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { @@ -27,9 +30,11 @@ lib = nixpkgs.lib; system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - args = { - inherit inputs system; - } // info; + args = + { + inherit inputs system; + } + // info; in { nixosConfigurations = { desktop = lib.nixosSystem { diff --git a/pkgs/neovim/default.nix b/pkgs/neovim/default.nix index 61f1603..709c2cf 100644 --- a/pkgs/neovim/default.nix +++ b/pkgs/neovim/default.nix @@ -11,15 +11,187 @@ sha256 = "sha256-Plo7edu9vXDDzZxyPu+traIAyHOouViU/nXNkDx+/N4="; }; in { - imports = [inputs.nixvim.homeManagerModules.default]; + imports = [ + inputs.nixvim.homeManagerModules.default + ]; programs.neovim.enable = true; programs.nixvim = { enable = true; - colorschemes.catppuccin.enable = true; plugins = { - lightline.enable = true; - alpha.enable = true; + alpha = { + enable = true; + layout = [ + { + type = "padding"; + val = 2; + } + { + type = "text"; + val = [ + " █████ █ ██" + " ██████ ██ ████ █ █" + " ██ █ █ ██ ████ ██ ███" + " █ █ █ ██ █ █ ██ █" + " █ █ ██ █ ████ ██ ███" + " ██ ██ ██ █ ███ █ ███ █ ██ ███ ███ ███ ████ ████" + " ██ ██ ██ █ █ ███ █ ████ ██ ███ ███ ███ ████ ███ █" + " ██ ██ ██ █ █ ███ ██ ██ ██ ██ ██ ██ ████ ████" + " ██ ██ ██ █ ██ █████ ██ ██ ██ ██ ██ ██ ██" + " ██ ██ ██ █ ████████ ██ ██ ██ ██ ██ ██ ██ ██" + " █ ██ ███ ███████ ██ ██ ██ ██ ██ ██ ██ ██" + " █ ███ ██ ██ ██ ██ █ ██ ██ ██ ██" + " ████ ██ ████ █ ██████ ███████ ██ ██ ██ ██" + " █ █████ ███████ ████ █████ ███ █ ███ ███ ███" + " █ ██ █████ ███ ███ ███ ███" + " █" + " █" + " ██" + ]; + opts = { + position = "center"; + hl = "Type"; + }; + } + { + type = "padding"; + val = 4; + } + { + type = "group"; + val = [ + { + type = "button"; + val = "  New File "; + on_press.__raw = "function() vim.cmd[[ene]] end"; + opts = { + shortcut = "n"; + keymap = [ + "n" + "n" + "ene" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + position = "center"; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "padding"; + val = 2; + } + { + type = "button"; + val = "  Find File "; + opts = { + shortcut = "f"; + keymap = [ + "n" + "f" + "lua require('fzf-lua').files({ cwd = vim.loop.cwd() })" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + position = "center"; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "padding"; + val = 2; + } + { + type = "button"; + val = "  Recent Files "; + on_press.__raw = "function() require('telescope.builtin').oldfiles() end"; + opts = { + shortcut = "r"; + keymap = [ + "n" + "r" + "lua require('fzf-lua').oldfiles({ cwd = vim.loop.cwd() })" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + position = "center"; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "padding"; + val = 2; + } + { + type = "button"; + val = "  Find Text "; + on_press.__raw = "function() require('telescope.builtin').live_grep() end"; + opts = { + shortcut = "g"; + keymap = [ + "n" + "g" + "lua require('fzf-lua').live_grep()" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + position = "center"; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + { + type = "padding"; + val = 2; + } + { + type = "button"; + val = "  Quit Neovim "; + on_press.__raw = "function() vim.cmd[[qa]] end"; + opts = { + shortcut = "q"; + keymap = [ + "n" + "q" + "qa" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + position = "center"; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + ]; + } + ]; + }; }; + imports = [ + # ./custom/dashboard.nix + ]; }; home.packages = with pkgs; [ lazygit