diff --git a/flake.lock b/flake.lock index 4e3d4e3..5ba5042 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "catppuccin": { + "flake": false, + "locked": { + "lastModified": 1713105352, + "narHash": "sha256-yTVou/WArEWygBBs2NFPI9Dm9iSGfwVftKFbOAGl8tk=", + "owner": "catppuccin", + "repo": "nvim", + "rev": "a1439ad7c584efb3d0ce14ccb835967f030450fe", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nvim", + "type": "github" + } + }, "cmp-luasnip": { "flake": false, "locked": { @@ -373,6 +389,7 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "cmp-luasnip": "cmp-luasnip", "cmp-nvim-lsp": "cmp-nvim-lsp", "cmp-tabby": "cmp-tabby", @@ -398,8 +415,7 @@ "plenary-nvim": "plenary-nvim", "tabby-nvim": "tabby-nvim", "telescope-live-grep-args-nvim": "telescope-live-grep-args-nvim", - "telescope-nvim": "telescope-nvim", - "theme": "theme" + "telescope-nvim": "telescope-nvim" } }, "systems": { @@ -464,22 +480,6 @@ "repo": "telescope.nvim", "type": "github" } - }, - "theme": { - "flake": false, - "locked": { - "lastModified": 1695478950, - "narHash": "sha256-SV5DTVwcVv6YIb7TGNYwq6rtIG5pFKubK07snXhV7z8=", - "owner": "catppuccin", - "repo": "nvim", - "rev": "3d9a5ed556e289bce6c1fb0af89ec838360641b2", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nvim", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 357c290..20d1c2d 100644 --- a/flake.nix +++ b/flake.nix @@ -126,7 +126,7 @@ }; # https://github.com/catppuccin/nvim - theme = { + catppuccin = { url = "github:catppuccin/nvim"; flake = false; }; @@ -191,7 +191,7 @@ "lualine-nvim" "lualine-lsp-progress" "nvim-web-devicons" - "theme" + "catppuccin" # ux "hop-nvim" "nvim-orgmode" @@ -238,20 +238,17 @@ } // flake-utils.lib.eachDefaultSystem (system: let - inherit (builtins) mapAttrs; pkgs = import nixpkgs { inherit system; }; minimalNeovim = mkNeovim pkgs; - recommendedNeovim = minimalNeovim.override { + recommendedNeovim = minimalNeovim.override (prev: { modules = { + catppuccin = { }; nvim-tree-lua = { - configs = { - renderer = { - group_empty = true; - full_name = true; - }; - + configs.renderer = { + group_empty = true; + full_name = true; }; keymaps = [ { mode = "n"; bind = "nt"; command = "NvimTreeToggle"; } @@ -260,7 +257,7 @@ }; }; - plugins = with minimalNeovim.nix2lua; { + plugins = with prev.nix2lua.lib; { lualine-nvim = pipe [ (require "lualine") (call "setup" [{ @@ -278,7 +275,7 @@ }]) ]; }; - }; + }); fullNeovim = recommendedNeovim.override { plugins = recommendedNeovim.plugins // (with minimalNeovim.nix2lua; { diff --git a/modules/catppuccin.nix b/modules/catppuccin.nix new file mode 100644 index 0000000..96c87c8 --- /dev/null +++ b/modules/catppuccin.nix @@ -0,0 +1,13 @@ +{ nix2lua }: + + +{ flavour ? "frappe" }: + +with nix2lua.lib; +{ + catppuccin = [ + (set "vim.g.catppuccin_flavour" flavour) + (pipe [ (require "catppuccin") (call "setup" [ ]) ]) + (call "vim.cmd" [ "colorscheme catppuccin" ]) + ]; +} diff --git a/neovim.nix b/neovim.nix index 8a39831..04d59d2 100644 --- a/neovim.nix +++ b/neovim.nix @@ -84,6 +84,6 @@ in }).overrideAttrs (oldAttrs: { passthru = oldAttrs.passthru // { nix2lua = nix2lua.lib; - inherit plugins; + inherit plugins modules; }; })