Compare commits

...

10 commits

24 changed files with 1154 additions and 926 deletions

View file

@ -1,5 +1,5 @@
{ {
colorschemes.gruvbox ={ colorschemes.gruvbox = {
enable = true; enable = true;
}; };
} }

View file

@ -4,10 +4,10 @@
}; };
extraConfigLua = '' extraConfigLua = ''
---------------------------------- ----------------------------------
-- START custom setup for onedark -- START custom setup for onedark
---------------------------------- ----------------------------------
-- https://github.com/navarasu/onedark.nvim -- https://github.com/navarasu/onedark.nvim
require('onedark').setup { require('onedark').setup {
-- Main options -- -- Main options --
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light' style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
transparent = true, -- Show/hide background transparent = true, -- Show/hide background
@ -47,13 +47,12 @@ require('onedark').setup {
undercurl = true, -- use undercurl instead of underline for diagnostics undercurl = true, -- use undercurl instead of underline for diagnostics
background = true, -- use background color for virtual text background = true, -- use background color for virtual text
}, },
} }
require('onedark').load() require('onedark').load()
---------------------------------- ----------------------------------
-- END custom setup for onedark -- END custom setup for onedark
---------------------------------- ----------------------------------
''; '';
} }

View file

@ -1,5 +1,3 @@
# The line beneath this is called `modeline`. See `:help modeline`
# vim: ts=4:sts=0:sw=0:tw=78:noet
{ {
# Import all your configuration modules here # Import all your configuration modules here
imports = [ imports = [

View file

@ -1,10 +1,11 @@
# The line beneath this is called `modeline`. See `:help modeline`
# vim: ts=4:sts=0:sw=0:tw=78:noet
{ {
keymaps = [ keymaps = [
{ {
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true}) # vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
mode = [ "n" "v" ]; mode = [
"n"
"v"
];
key = "\\y"; key = "\\y";
action = "\"+y"; action = "\"+y";
options = { options = {

View file

@ -1,6 +1,4 @@
{ pkgs { pkgs, ... }:
, ...}:{ {
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [ vim-rhubarb ];
vim-rhubarb
];
} }

View file

@ -1,6 +1,4 @@
{ pkgs { pkgs, ... }:
, ...}:{ {
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [ vim-sleuth ];
vim-sleuth
];
} }

View file

@ -1,3 +1,4 @@
{ helpers, ...}:
{ {
plugins.leap = { plugins.leap = {
enable = true; enable = true;
@ -5,24 +6,39 @@
}; };
keymaps = [ keymaps = [
{ {
mode = [ "n" "x" "o" ]; mode = [
"n"
"x"
"o"
];
key = "<leader>ss"; key = "<leader>ss";
action = "function() require('leap').leap {} end"; action = helpers.mkRaw "function() require('leap').leap {} end";
lua = true;
# action = "require('leap').leap"; # action = "require('leap').leap";
} }
{ {
mode = [ "n" "x" "o" ]; mode = [
"n"
"x"
"o"
];
key = "<leader>sS"; key = "<leader>sS";
action = "<Plug>(leap-backward-to)"; action = "<Plug>(leap-backward-to)";
} }
{ {
mode = [ "n" "x" "o" ]; mode = [
"n"
"x"
"o"
];
key = "<leader>sx"; key = "<leader>sx";
action = "<Plug>(leap-forward-till)"; action = "<Plug>(leap-forward-till)";
} }
{ {
mode = [ "n" "x" "o" ]; mode = [
"n"
"x"
"o"
];
key = "<leader>sX"; key = "<leader>sX";
action = "<Plug>(leap-backward-till)"; action = "<Plug>(leap-backward-till)";
} }

View file

@ -59,7 +59,9 @@
# }; # };
# }; # };
}; };
clangd = {enable = true;}; clangd = {
enable = true;
};
lua-ls = { lua-ls = {
enable = true; enable = true;
extraOptions = { extraOptions = {
@ -71,15 +73,24 @@
telemetry = { telemetry = {
enabled = false; enabled = false;
}; };
hint = {enable = true;}; hint = {
enable = true;
}; };
}; };
}; };
}; };
nil_ls = {enable = true;}; };
nil-ls = {
enable = true;
};
tsserver = { tsserver = {
enable = false; enable = false;
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"]; filetypes = [
"javascript"
"javascriptreact"
"typescript"
"typescriptreact"
];
extraOptions = { extraOptions = {
settings = { settings = {
javascript = { javascript = {
@ -107,9 +118,15 @@
}; };
}; };
}; };
eslint = {enable = true;}; eslint = {
pyright = {enable = true;}; enable = true;
ruff-lsp = {enable = true;}; };
pyright = {
enable = true;
};
ruff-lsp = {
enable = true;
};
rust-analyzer = { rust-analyzer = {
enable = true; enable = true;
@ -224,13 +241,13 @@
------------------------------ ------------------------------
-- START texmagic, texlab -- START texmagic, texlab
------------------------------ ------------------------------
-- Below this one line is for texmagic only -- Below this one line is for texmagic only
-- vim.g['tex_flavor'] = 'latex' -- vim.g['tex_flavor'] = 'latex'
require('lspconfig').texlab.setup{ require('lspconfig').texlab.setup{
cmd = {"texlab"}, cmd = {"texlab"},
filetypes = {"tex", "plaintex", "bib"}, filetypes = {"tex", "plaintex", "bib"},
single_file_support = true, single_file_support = true,
@ -294,18 +311,18 @@ require('lspconfig').texlab.setup{
diagnosticsDelay = 300, diagnosticsDelay = 300,
} }
} }
} }
-- compile laTeX keymap -- compile laTeX keymap
vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' ) vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' )
-- forwardSearch -- forwardSearch
vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' ) vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' )
-- if lsp failed to start, start manually -- if lsp failed to start, start manually
vim.keymap.set('n', '<leader>j', ':LspStart<CR>' ) vim.keymap.set('n', '<leader>j', ':LspStart<CR>' )
------------------------------ ------------------------------
-- END texmagic, texlab -- END texmagic, texlab
------------------------------ ------------------------------
''; '';
} }

View file

@ -1,22 +1,32 @@
# vim: ts=4:sts=0:sw=0:noet { pkgs, pkgs-stable, ... }:
{
pkgs-stable
, ... }:
{ {
# https://github.com/nvim-neorg/neorg
# NOW neorg require lua-utils.nvim, nvim-nio, pathlib.vim
# https://github.com/nix-community/nixvim/issues/1395#issuecomment-2267262919
# Workaround
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.lua-utils-nvim) pname version src; })
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.pathlib-nvim) pname version src; })
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.nvim-nio) pname version src; })
];
plugins = { plugins = {
neorg = { neorg = {
enable = true; enable = true;
package = pkgs-stable.vimPlugins.neorg; # package = pkgs-stable.vimPlugins.neorg;
package = pkgs.vimPlugins.neorg;
modules = { modules = {
"core.defaults" = {}; # -- Loads default behaviour "core.defaults" = { }; # -- Loads default behaviour
"core.summary" = {}; "core.summary" = { };
"core.export" = {}; "core.export" = { };
"core.export.markdown" = {}; "core.export.markdown" = { };
"core.concealer" = { "core.concealer" = {
config = { config = {
folds = false; folds = false;
}; };
}; #-- Adds pretty icons to your documents }; # -- Adds pretty icons to your documents
"core.dirman" = { "core.dirman" = {
config = { config = {
workspaces = { workspaces = {

View file

@ -17,22 +17,22 @@
# }; # };
undo = { undo = {
enable = true; enable = true;
mappings = { settings.mappings = {
i = { i = {
"<cr>" = "yank_additions"; "<cr>" = "require('telescope-undo.actions').yank_additions";
"<s-cr>" = "yank_deletions"; "<s-cr>" = "require('telescope-undo.actions').yank_deletions";
"<c-cr>" = "restore"; "<c-cr>" = "require('telescope-undo.actions').restore";
}; };
n = { n = {
"y" = "yank_additions"; "y" = "require('telescope-undo.actions').yank_additions";
"Y" = "yank_deletions"; "Y" = "require('telescope-undo.actions').yank_deletions";
"u" = "restore"; "u" = "require('telescope-undo.actions').restore";
}; };
}; };
}; };
}; };
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via: # If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
defaults = { settings.defaults = {
mappings = { mappings = {
i = { i = {
"<esc>" = { "<esc>" = {
@ -47,95 +47,95 @@
keymaps = { keymaps = {
"<leader><space>" = { "<leader><space>" = {
action = "find_files, {}"; action = "find_files, {}";
desc = "Find project files"; options.desc = "Find project files";
}; };
"<leader>/" = { "<leader>/" = {
action = "live_grep"; action = "live_grep";
desc = "Grep (root dir)"; options.desc = "Grep (root dir)";
}; };
"<leader>:" = { "<leader>:" = {
action = "command_history, {}"; action = "command_history, {}";
desc = "Command History"; options.desc = "Command History";
}; };
"<leader>b" = { "<leader>b" = {
action = "buffers, {}"; action = "buffers, {}";
desc = "+buffer"; options.desc = "+buffer";
}; };
"<leader>ff" = { "<leader>ff" = {
action = "find_files, {}"; action = "find_files, {}";
desc = "Find project files"; options.desc = "Find project files";
}; };
"<leader>fr" = { "<leader>fr" = {
action = "oldfiles, {}"; action = "oldfiles, {}";
desc = "Recent"; options.desc = "Recent";
}; };
"<leader>fb" = { "<leader>fb" = {
action = "buffers, {}"; action = "buffers, {}";
desc = "Buffers"; options.desc = "Buffers";
}; };
"<C-p>" = { "<C-p>" = {
action = "git_files, {}"; action = "git_files, {}";
desc = "Search git files"; options.desc = "Search git files";
}; };
"<leader>gc" = { "<leader>gc" = {
action = "git_commits, {}"; action = "git_commits, {}";
desc = "Commits"; options.desc = "Commits";
}; };
"<leader>gs" = { "<leader>gs" = {
action = "git_status, {}"; action = "git_status, {}";
desc = "Status"; options.desc = "Status";
}; };
"<leader>sa" = { "<leader>sa" = {
action = "autocommands, {}"; action = "autocommands, {}";
desc = "Auto Commands"; options.desc = "Auto Commands";
}; };
"<leader>sb" = { "<leader>sb" = {
action = "current_buffer_fuzzy_find, {}"; action = "current_buffer_fuzzy_find, {}";
desc = "Buffer"; options.desc = "Buffer";
}; };
"<leader>sc" = { "<leader>sc" = {
action = "command_history, {}"; action = "command_history, {}";
desc = "Command History"; options.desc = "Command History";
}; };
"<leader>sC" = { "<leader>sC" = {
action = "commands, {}"; action = "commands, {}";
desc = "Commands"; options.desc = "Commands";
}; };
"<leader>sD" = { "<leader>sD" = {
action = "diagnostics, {}"; action = "diagnostics, {}";
desc = "Workspace diagnostics"; options.desc = "Workspace diagnostics";
}; };
"<leader>sh" = { "<leader>sh" = {
action = "help_tags, {}"; action = "help_tags, {}";
desc = "Help pages"; options.desc = "Help pages";
}; };
"<leader>sH" = { "<leader>sH" = {
action = "highlights, {}"; action = "highlights, {}";
desc = "Search Highlight Groups"; options.desc = "Search Highlight Groups";
}; };
"<leader>sk" = { "<leader>sk" = {
action = "keymaps, {}"; action = "keymaps, {}";
desc = "Keymaps"; options.desc = "Keymaps";
}; };
"<leader>sM" = { "<leader>sM" = {
action = "man_pages, {}"; action = "man_pages, {}";
desc = "Man pages"; options.desc = "Man pages";
}; };
"<leader>sm" = { "<leader>sm" = {
action = "marks, {}"; action = "marks, {}";
desc = "Jump to Mark"; options.desc = "Jump to Mark";
}; };
"<leader>so" = { "<leader>so" = {
action = "vim_options, {}"; action = "vim_options, {}";
desc = "Options"; options.desc = "Options";
}; };
"<leader>sR" = { "<leader>sR" = {
action = "resume, {}"; action = "resume, {}";
desc = "Resume"; options.desc = "Resume";
}; };
"<leader>uC" = { "<leader>uC" = {
action = "colorscheme, {}"; action = "colorscheme, {}";
desc = "Colorscheme preview"; options.desc = "Colorscheme preview";
}; };
}; };
}; };

View file

@ -1,12 +1,10 @@
# The line beneath this is called `modeline`. See `:help modeline`
# vim: ts=4:sts=0:sw=0:noet
{ {
config = { config = {
globals = { globals = {
mapleader = " "; mapleader = " ";
maplocalleader = " "; maplocalleader = " ";
}; };
options = { opts = {
relativenumber = true; relativenumber = true;
splitbelow = true; splitbelow = true;
redrawtime = 5000; redrawtime = 5000;
@ -25,7 +23,7 @@
smartindent = false; smartindent = false;
# length to use when shifting text (eg. <<, >> and == commands) # length to use when shifting text (eg. <<, >> and == commands)
tabstop=4; tabstop = 4;
shiftwidth = 0; shiftwidth = 0;
expandtab = false; expandtab = false;

355
flake.lock generated
View file

@ -2,18 +2,17 @@
"nodes": { "nodes": {
"devshell": { "devshell": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1711099426, "lastModified": 1722113426,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,6 +22,38 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@ -36,7 +67,7 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_2": { "flake-compat_4": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -60,11 +91,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709336216, "lastModified": 1722555600,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -95,24 +126,6 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@ -127,11 +140,68 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722857853,
"narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"pre-commit-hooks", "git-hooks",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -157,19 +227,75 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711133180, "lastModified": 1720042825,
"narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"neorg": {
"flake": false,
"locked": {
"lastModified": 1722198397,
"narHash": "sha256-oaZi6UP8gC0uy1QYrXrewfYoJpds16GP+Rnef8CAaRA=",
"owner": "nvim-neorg",
"repo": "neorg",
"rev": "e5e797e6eddcb6efb1d2c3fc2612b31ad9a76cef",
"type": "github"
},
"original": {
"owner": "nvim-neorg",
"repo": "neorg",
"type": "github"
}
},
"neorg-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"neorg": "neorg",
"neorg-telescope": "neorg-telescope",
"nixpkgs": "nixpkgs",
"norg": "norg",
"norg-meta": "norg-meta"
},
"locked": {
"lastModified": 1722975193,
"narHash": "sha256-SMvVuYKD4T9wQZhHs6oFUGMF9M4t2tg1bYE5c/6SJYA=",
"owner": "nvim-neorg",
"repo": "nixpkgs-neorg-overlay",
"rev": "e8193159b8cceb991d91acc3762fa3a749a9beab",
"type": "github"
},
"original": {
"owner": "nvim-neorg",
"repo": "nixpkgs-neorg-overlay",
"type": "github"
}
},
"neorg-telescope": {
"flake": false,
"locked": {
"lastModified": 1722358034,
"narHash": "sha256-ei4uUqpIQjGKzu5ryu0Hlmis9TS9FJsYnjt4J4QdWlw=",
"owner": "nvim-neorg",
"repo": "neorg-telescope",
"rev": "ddb2556644cae922699a239bbb0fe16e25b084b7",
"type": "github"
},
"original": {
"owner": "nvim-neorg",
"repo": "neorg-telescope",
"type": "github"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -178,11 +304,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710717205, "lastModified": 1722924007,
"narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=", "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3", "rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -193,46 +319,76 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711401922, "lastModified": 1722957468,
"narHash": "sha256-QoQqXoj8ClGo0sqD/qWKFWezgEwUL0SUh37/vY2jNhc=", "narHash": "sha256-SQ0TCC4aklOhN/OzcztrKqDLY8SjpIZcyvTulzhDXs0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "07262b18b97000d16a4bdb003418bd2fb067a932", "rev": "2a13929e1f191b3690dd2f2db13098b04adb9043",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1712437997,
"narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1711333969, "lastModified": 1644486793,
"narHash": "sha256-5PiWGn10DQjMZee5NXzeA6ccsv60iLu+Xtw+mfvkUAs=", "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "57e6b3a9e4ebec5aa121188301f04a6b8c354c9b", "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1644486793,
"narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1882c6b7368fd284ad01b0a5b5601ef136321292",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 0,
"narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=",
"path": "/nix/store/79j6vc975md1w3f2fgli3xw657zyxxyc-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1722869614,
"narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "883180e6550c1723395a3a342f830bfc5c371f6b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -240,60 +396,75 @@
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_3",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_5",
"pre-commit-hooks": "pre-commit-hooks" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1711545203, "lastModified": 1722925293,
"narHash": "sha256-PPXcH/pIbxr8awgC+q+rrIgRRH8uYeWoK5Af3kFhjEc=", "narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "d248bf587cdb86b661ca54f16fe2f3263018b985", "rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "nixos-24.05",
"repo": "nixvim", "repo": "nixvim",
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": { "norg": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"gitignore": "gitignore", "nixpkgs": "nixpkgs_2"
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1711409088, "lastModified": 1672582520,
"narHash": "sha256-+rTCra8TY4vuSNTtQ0tcex1syCRPoKyb8vyHmoxkga4=", "narHash": "sha256-kv3UiJUqMSF1qd3r4OCWomVTHTYjwX/EBRWm8mOSdwg=",
"owner": "cachix", "owner": "nvim-neorg",
"repo": "pre-commit-hooks.nix", "repo": "tree-sitter-norg",
"rev": "db656fc3e34907000df26e8bc5cc3c94fb27f353", "rev": "d7a466e182a532065a559dbfc7a847271d5e9c29",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "nvim-neorg",
"repo": "pre-commit-hooks.nix", "ref": "dev",
"repo": "tree-sitter-norg",
"type": "github"
}
},
"norg-meta": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1713028366,
"narHash": "sha256-8qSdwHlfnjFuQF4zNdLtU2/tzDRhDZbo9K54Xxgn5+8=",
"owner": "nvim-neorg",
"repo": "tree-sitter-norg-meta",
"rev": "6f0510cc516a3af3396a682fbd6655486c2c9d2d",
"type": "github"
},
"original": {
"owner": "nvim-neorg",
"repo": "tree-sitter-norg-meta",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "neorg-overlay": "neorg-overlay",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs": "nixpkgs_4",
"nixvim": "nixvim" "nixvim": "nixvim"
} }
}, },
@ -327,18 +498,24 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1722330636,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
"owner": "nix-systems", "owner": "numtide",
"repo": "default", "repo": "treefmt-nix",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "numtide",
"repo": "default", "repo": "treefmt-nix",
"type": "github" "type": "github"
} }
} }

View file

@ -1,26 +1,41 @@
{ {
description = "my_nixvim flake"; # https://github.com/redyf/Neve/blob/main/flake.nix
description = "my_nixvim flake, Neve mod (only flake.nix)";
inputs = { inputs = {
nixvim.url = "github:nix-community/nixvim"; # https://github.com/nix-community/nixvim/issues/1859
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11"; # use nixos-24.05 branch to get rid of "error: attribute 'cmp-ai' missing"
nixvim.url = "github:nix-community/nixvim/nixos-24.05";
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
# https://github.com/nvim-neorg/nixpkgs-neorg-overlay
# https://github.com/nix-community/nixvim/issues/1395
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
}; };
outputs = { outputs = {
self, self
nixpkgs, , nixpkgs
nixpkgs-stable, # , nixpkgs-stable
nixvim, , nixvim
flake-utils, , flake-utils
... , neorg-overlay
, ...
} @ inputs: let } @ inputs: let
config = import ./config; # import the module directly config = import ./config; # import the module directly
in in
flake-utils.lib.eachDefaultSystem (system: let flake-utils.lib.eachDefaultSystem (system: let
nixvimLib = nixvim.lib.${system}; nixvimLib = nixvim.lib.${system};
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {
pkgs-stable = import nixpkgs-stable {inherit system;}; inherit system;
nixpkgs.overlays = [ neorg-overlay.overlays.default ];
};
# pkgs-stable = import nixpkgs-stable {
# inherit system;
# nixpkgs.overlays = [ neorg-overlay.overlays.default ];
# };
nixvim' = nixvim.legacyPackages.${system}; nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule { nvim = nixvim'.makeNixvimWithModule {
inherit pkgs; inherit pkgs;
@ -28,7 +43,8 @@
# You can use `extraSpecialArgs` to pass additional arguments to your module files # You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = { extraSpecialArgs = {
inherit self; inherit self;
inherit pkgs-stable; # inherit pkgs-stable;
inherit pkgs;
}; };
}; };
in { in {