Draft: modules #1
4 changed files with 41 additions and 31 deletions
36
flake.lock
36
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",
|
||||
|
|
17
flake.nix
17
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,21 +238,18 @@
|
|||
} //
|
||||
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 = {
|
||||
configs.renderer = {
|
||||
group_empty = true;
|
||||
full_name = true;
|
||||
};
|
||||
|
||||
};
|
||||
keymaps = [
|
||||
{ mode = "n"; bind = "<leader>nt"; command = "<CMD>NvimTreeToggle<CR>"; }
|
||||
{ mode = "n"; bind = "<leader>nf"; command = "<CMD>NvimTreeFindFile<CR>"; }
|
||||
|
@ -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; {
|
||||
|
|
13
modules/catppuccin.nix
Normal file
13
modules/catppuccin.nix
Normal file
|
@ -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" ])
|
||||
];
|
||||
}
|
|
@ -84,6 +84,6 @@ in
|
|||
}).overrideAttrs (oldAttrs: {
|
||||
passthru = oldAttrs.passthru // {
|
||||
nix2lua = nix2lua.lib;
|
||||
inherit plugins;
|
||||
inherit plugins modules;
|
||||
};
|
||||
})
|
||||
|
|
Reference in a new issue