mirror of
https://github.com/Dichgrem/DCGOS.git
synced 2025-12-18 12:02:00 -05:00
Compare commits
5 Commits
7683a7c148
...
2f4fb7e2d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f4fb7e2d2 | ||
|
|
51d40326c4 | ||
|
|
e2a382d90e | ||
|
|
e02cfc5dcd | ||
|
|
02da5c19e2 |
2
dotfiles/.config/niri/config.kdl
vendored
2
dotfiles/.config/niri/config.kdl
vendored
@@ -1,6 +1,6 @@
|
||||
input {
|
||||
disable-power-key-handling
|
||||
focus-follows-mouse
|
||||
focus-follows-mouse max-scroll-amount="0%"
|
||||
warp-mouse-to-focus
|
||||
|
||||
mouse {
|
||||
|
||||
80
flake.lock
generated
80
flake.lock
generated
@@ -77,11 +77,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762736304,
|
||||
"narHash": "sha256-IZh6dOZf22la7rF23WwQ4y7ncrciqKqT0CUJ6abEAIk=",
|
||||
"lastModified": 1763246168,
|
||||
"narHash": "sha256-gUDJZGSOg5syHtQvLImOKL6Eaw4e1ybz4o5pid66kQg=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "45073419e0a46bf106f025858e93b633e255e402",
|
||||
"rev": "6476fbdd52621b4a532309d982d468dc08204151",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -172,11 +172,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762440070,
|
||||
"narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=",
|
||||
"lastModified": 1762980239,
|
||||
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8",
|
||||
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -257,18 +257,20 @@
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1748186689,
|
||||
"narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=",
|
||||
"host": "gitlab.gnome.org",
|
||||
"lastModified": 1762869044,
|
||||
"narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0",
|
||||
"type": "github"
|
||||
"rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.gnome.org",
|
||||
"owner": "GNOME",
|
||||
"ref": "48.2",
|
||||
"ref": "gnome-49",
|
||||
"repo": "gnome-shell",
|
||||
"type": "github"
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
@@ -279,11 +281,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762661401,
|
||||
"narHash": "sha256-SVmijc8t23UMwru5f/9X1Ak5bSwvYkm0OQ5SxR7hOB0=",
|
||||
"lastModified": 1762964643,
|
||||
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c053d701d64f0727f62e0269c7940da5805bc9bc",
|
||||
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -299,11 +301,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762787259,
|
||||
"narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=",
|
||||
"lastModified": 1763313531,
|
||||
"narHash": "sha256-yvdCYUL85zEDp2NzPUBmaNBXP6KnWEOhAk3j7PTfsKw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e",
|
||||
"rev": "3670a78eee49deebe4825fc8ecc46b172d1a8391",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -349,11 +351,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762452596,
|
||||
"narHash": "sha256-Iaga+mkwWnWa6FxsAYknpHzeP344VCKGkdudX420LgA=",
|
||||
"lastModified": 1762951919,
|
||||
"narHash": "sha256-ma/xMEGf4J6n/RdZFdxXBJUQhP53HVEPQOC6Dp2TrkQ=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "99919fd35e70c1b18ce948d5329928d751031312",
|
||||
"rev": "3d248f6e8f877218dd2573fef8925ac997889922",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -387,11 +389,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1762596750,
|
||||
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
|
||||
"lastModified": 1762977756,
|
||||
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
|
||||
"rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -431,11 +433,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1762596750,
|
||||
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
|
||||
"lastModified": 1763283776,
|
||||
"narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
|
||||
"rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -447,11 +449,11 @@
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1758690382,
|
||||
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
||||
"lastModified": 1762977756,
|
||||
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
||||
"rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -471,11 +473,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762789067,
|
||||
"narHash": "sha256-z0VQRaEARqF5eARuAFhDixV+g5B+5IJ1iDKSUM+5EIY=",
|
||||
"lastModified": 1763334942,
|
||||
"narHash": "sha256-ORaewCyY3Fff+XaGrRjWi0XYzC22YTr/H3oL9c9k+9I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "2dc09e09cc65026f0899cc50291e244ee24835d3",
|
||||
"rev": "59af09b1814538b826f30eac8024d126d8c36efc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -551,11 +553,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762655942,
|
||||
"narHash": "sha256-hOM12KcQNQALrhB9w6KJmV5hPpm3GA763HRe9o7JUiI=",
|
||||
"lastModified": 1763087910,
|
||||
"narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6ac961b02d4235572692241e333d0470637f5492",
|
||||
"rev": "cf4a68749733d45c0420726596367acd708eb2e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -583,11 +585,11 @@
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762264356,
|
||||
"narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=",
|
||||
"lastModified": 1763314990,
|
||||
"narHash": "sha256-gs98KFE3X2HQ64gsIpQNsj1lKFTdkNdX+1KMQTDXEus=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b",
|
||||
"rev": "b68e8220689a6f0393204b07be1bc14bb973a0ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,205 +1,232 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
neo-tree-nvim-main = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "neo-tree-nvim-main";
|
||||
version = "3.35.2+6";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-neo-tree";
|
||||
repo = "neo-tree.nvim";
|
||||
rev = "8dd9f08ff086d09d112f1873f88dc0f74b598cdb";
|
||||
sha256 = "sha256-edthaqznGTJ+VFVORK7gfHI9J14PLAghG9prsWlzXtc=";
|
||||
};
|
||||
doCheck = false;
|
||||
meta.homepage = "https://github.com/nvim-neo-tree/neo-tree.nvim/";
|
||||
meta.hydraPlatforms = [];
|
||||
};
|
||||
in {
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# LazyVim
|
||||
lua-language-server
|
||||
#Go
|
||||
gopls
|
||||
gofumpt
|
||||
golines
|
||||
|
||||
#Lua
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
#Nix
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
|
||||
#Java
|
||||
google-java-format
|
||||
jdt-language-server
|
||||
|
||||
#Rust
|
||||
clippy
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
|
||||
#Shell
|
||||
shfmt
|
||||
bash-language-server
|
||||
|
||||
#C/C++
|
||||
clang-tools
|
||||
|
||||
#Kotlin
|
||||
ktlint
|
||||
kotlin-language-server
|
||||
|
||||
#Python
|
||||
ruff
|
||||
black
|
||||
python312Packages.python-lsp-server
|
||||
|
||||
#JS/TS/Web
|
||||
prettierd
|
||||
nodePackages.prettier
|
||||
|
||||
jq #JSON
|
||||
taplo #TOML
|
||||
yamlfmt #YAML
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
|
||||
extraLuaConfig = let
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
LazyVim
|
||||
bufferline-nvim
|
||||
cmp_luasnip
|
||||
conform-nvim
|
||||
dashboard-nvim
|
||||
flash-nvim
|
||||
friendly-snippets
|
||||
gitsigns-nvim
|
||||
lualine-nvim
|
||||
{
|
||||
name = "neo-tree.nvim";
|
||||
path = neo-tree-nvim-main;
|
||||
}
|
||||
neoconf-nvim
|
||||
neodev-nvim
|
||||
noice-nvim
|
||||
nui-nvim
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
nvim-notify
|
||||
nvim-spectre
|
||||
nvim-treesitter
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
nvim-ts-autotag
|
||||
nvim-ts-context-commentstring
|
||||
nvim-web-devicons
|
||||
persistence-nvim
|
||||
plenary-nvim
|
||||
todo-comments-nvim
|
||||
tokyonight-nvim
|
||||
trouble-nvim
|
||||
vim-illuminate
|
||||
vim-startuptime
|
||||
which-key-nvim
|
||||
fzf-lua
|
||||
snacks-nvim
|
||||
{
|
||||
name = "lazydev.nvim";
|
||||
path = lazydev-nvim;
|
||||
}
|
||||
{
|
||||
name = "blink.cmp";
|
||||
path = blink-cmp;
|
||||
}
|
||||
{
|
||||
name = "LuaSnip";
|
||||
path = luasnip;
|
||||
}
|
||||
{
|
||||
name = "mini.ai";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.bufremove";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.comment";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.indentscope";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.pairs";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.surround";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.icons";
|
||||
path = mini-icons;
|
||||
}
|
||||
{
|
||||
name = "grug-far.nvim";
|
||||
path = grug-far-nvim;
|
||||
}
|
||||
];
|
||||
mkEntryFromDrv = drv:
|
||||
if lib.isDerivation drv
|
||||
then {
|
||||
name = "${lib.getName drv}";
|
||||
path = drv;
|
||||
}
|
||||
else drv;
|
||||
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
|
||||
in ''
|
||||
require("lazy").setup({
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
dev = {
|
||||
-- reuse files from pkgs.vimPlugins.*
|
||||
path = "${lazyPath}",
|
||||
patterns = { "." },
|
||||
-- fallback to download
|
||||
fallback = true,
|
||||
},
|
||||
rocks = {
|
||||
enabled = false,
|
||||
hererocks = false,
|
||||
},
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- The following configs are needed for fixing lazyvim on nix
|
||||
-- disable mason.nvim, use programs.neovim.extraPackages
|
||||
{ "mason-org/mason-lspconfig.nvim", enabled = false },
|
||||
{ "mason-org/mason.nvim", enabled = false },
|
||||
-- import/override with your plugins
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
{ import = "lazyvim.plugins.extras.lang.clangd" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "plugins" },
|
||||
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
|
||||
{ "nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = {}
|
||||
end,
|
||||
extraLuaConfig =
|
||||
let
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
LazyVim
|
||||
bufferline-nvim
|
||||
cmp_luasnip
|
||||
conform-nvim
|
||||
dashboard-nvim
|
||||
flash-nvim
|
||||
friendly-snippets
|
||||
gitsigns-nvim
|
||||
lualine-nvim
|
||||
neo-tree-nvim
|
||||
neoconf-nvim
|
||||
neodev-nvim
|
||||
noice-nvim
|
||||
nui-nvim
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
nvim-notify
|
||||
nvim-spectre
|
||||
nvim-treesitter
|
||||
nvim-treesitter-context
|
||||
nvim-ts-autotag
|
||||
nvim-ts-context-commentstring
|
||||
nvim-web-devicons
|
||||
persistence-nvim
|
||||
plenary-nvim
|
||||
todo-comments-nvim
|
||||
tokyonight-nvim
|
||||
trouble-nvim
|
||||
vim-illuminate
|
||||
vim-startuptime
|
||||
which-key-nvim
|
||||
fzf-lua
|
||||
snacks-nvim
|
||||
{
|
||||
name = "lazydev.nvim";
|
||||
path = lazydev-nvim;
|
||||
}
|
||||
{
|
||||
name = "blink.cmp";
|
||||
path = blink-cmp;
|
||||
}
|
||||
{
|
||||
name = "LuaSnip";
|
||||
path = luasnip;
|
||||
}
|
||||
{
|
||||
name = "mini.ai";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.bufremove";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.comment";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.indentscope";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.pairs";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.surround";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.icons";
|
||||
path = mini-icons;
|
||||
}
|
||||
{
|
||||
name = "grug-far.nvim";
|
||||
path = grug-far-nvim;
|
||||
}
|
||||
];
|
||||
mkEntryFromDrv = drv:
|
||||
if lib.isDerivation drv
|
||||
then {
|
||||
name = "${lib.getName drv}";
|
||||
path = drv;
|
||||
}
|
||||
else drv;
|
||||
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
|
||||
in
|
||||
''
|
||||
require("lazy").setup({
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
dev = {
|
||||
-- reuse files from pkgs.vimPlugins.*
|
||||
path = "${lazyPath}",
|
||||
patterns = { "." },
|
||||
-- fallback to download
|
||||
fallback = true,
|
||||
},
|
||||
rocks = {
|
||||
enabled = false,
|
||||
hererocks = false,
|
||||
},
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- The following configs are needed for fixing lazyvim on nix
|
||||
-- disable mason.nvim, use programs.neovim.extraPackages
|
||||
{ "mason-org/mason-lspconfig.nvim", enabled = false },
|
||||
{ "mason-org/mason.nvim", enabled = false },
|
||||
-- import/override with your plugins
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
{ import = "lazyvim.plugins.extras.lang.clangd" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.kotlin" },
|
||||
{ import = "lazyvim.plugins.extras.lang.dart" },
|
||||
{ import = "plugins" },
|
||||
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
|
||||
{ "nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = {}
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
};
|
||||
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
|
||||
xdg.configFile."nvim/parser".source = let
|
||||
parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths =
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins:
|
||||
with plugins; [
|
||||
bash
|
||||
c
|
||||
lua
|
||||
python
|
||||
go
|
||||
rust
|
||||
java
|
||||
javascript
|
||||
typescript
|
||||
tsx
|
||||
vue
|
||||
html
|
||||
css
|
||||
json
|
||||
yaml
|
||||
toml
|
||||
dockerfile
|
||||
]))
|
||||
.dependencies;
|
||||
};
|
||||
in "${parsers}/parser";
|
||||
xdg.configFile."nvim/parser".source =
|
||||
let
|
||||
parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths =
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins:
|
||||
with plugins; [
|
||||
bash
|
||||
c
|
||||
go
|
||||
lua
|
||||
rust
|
||||
java
|
||||
dart
|
||||
kotlin
|
||||
python
|
||||
javascript
|
||||
typescript
|
||||
tsx
|
||||
vue
|
||||
html
|
||||
css
|
||||
json
|
||||
yaml
|
||||
toml
|
||||
dockerfile
|
||||
])).dependencies;
|
||||
};
|
||||
in
|
||||
"${parsers}/parser";
|
||||
|
||||
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
|
||||
xdg.configFile."nvim/lua".source = ./lua;
|
||||
|
||||
# Set default editor
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
vim.g.autoformat = false
|
||||
68
home/nvim/lua/plugins/format.lua
Normal file
68
home/nvim/lua/plugins/format.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.format_on_save = nil
|
||||
opts.formatters = opts.formatters or {}
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
opts.formatters.nixpkgs_fmt = {
|
||||
command = "nixpkgs-fmt",
|
||||
args = function(ctx)
|
||||
return {}
|
||||
end,
|
||||
stdin = true,
|
||||
exit_codes = { 0 },
|
||||
}
|
||||
|
||||
-- Go
|
||||
opts.formatters_by_ft.go = { "gofumpt" }
|
||||
-- Lua
|
||||
opts.formatters_by_ft.lua = { "stylua" }
|
||||
-- Nix
|
||||
opts.formatters_by_ft.nix = { "nixpkgs_fmt", stop_after_first = true }
|
||||
-- Java
|
||||
opts.formatters_by_ft.java = { "google_java_format" }
|
||||
-- Rust
|
||||
opts.formatters_by_ft.rust = { "rustfmt" }
|
||||
-- Shell
|
||||
opts.formatters_by_ft.sh = { "shfmt" }
|
||||
-- C/C++
|
||||
opts.formatters_by_ft.c = { "clang_format" }
|
||||
opts.formatters_by_ft.cpp = { "clang_format" }
|
||||
-- Kotlin
|
||||
opts.formatters_by_ft.kotlin = { "ktlint" }
|
||||
-- Python
|
||||
opts.formatters_by_ft.python = { "black", "ruff_format" }
|
||||
-- JS/TS/Web
|
||||
opts.formatters_by_ft.javascript = { "prettierd" }
|
||||
opts.formatters_by_ft.typescript = { "prettierd" }
|
||||
opts.formatters_by_ft.javascriptreact = { "prettierd" }
|
||||
opts.formatters_by_ft.typescriptreact = { "prettierd" }
|
||||
opts.formatters_by_ft.vue = { "prettierd" }
|
||||
-- JSON
|
||||
opts.formatters_by_ft.json = { "jq" }
|
||||
-- YAML
|
||||
opts.formatters_by_ft.yaml = { "yamlfmt" }
|
||||
-- TOML
|
||||
opts.formatters_by_ft.toml = { "taplo" }
|
||||
-- Dart / Flutter
|
||||
opts.formatters_by_ft.dart = {
|
||||
command = "dart",
|
||||
args = function(ctx)
|
||||
return { "format", ctx.bufname }
|
||||
end,
|
||||
stdin = false,
|
||||
exit_codes = { 0 },
|
||||
}
|
||||
opts.default_format_opts = {
|
||||
timeout_ms = 1500,
|
||||
lsp_format = "fallback",
|
||||
stop_after_first = false,
|
||||
}
|
||||
opts.log_level = vim.log.levels.ERROR
|
||||
opts.notify_on_error = true
|
||||
opts.notify_no_formatters = true
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
return {
|
||||
"ojroques/nvim-osc52",
|
||||
config = function()
|
||||
require("osc52").setup {
|
||||
max_length = 0, -- 不限制长度
|
||||
silent = false,
|
||||
trim = false,
|
||||
}
|
||||
"ojroques/nvim-osc52",
|
||||
config = function()
|
||||
require("osc52").setup({
|
||||
max_length = 0, -- 不限制长度
|
||||
silent = false,
|
||||
trim = false,
|
||||
})
|
||||
|
||||
local function copy()
|
||||
if vim.v.event.operator == "y" and vim.v.event.regname == "" then
|
||||
require("osc52").copy_register("")
|
||||
end
|
||||
end
|
||||
local function copy()
|
||||
if vim.v.event.operator == "y" and vim.v.event.regname == "" then
|
||||
require("osc52").copy_register("")
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||
end,
|
||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||
end,
|
||||
}
|
||||
|
||||
30
home/nvim/lua/plugins/treesitter.lua
Normal file
30
home/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
return {
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
treesitter = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
ensure_installed = {},
|
||||
auto_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -7,17 +7,10 @@
|
||||
GPU-AMD = true;
|
||||
### See https://nixos.wiki/wiki/AMD_GPU
|
||||
|
||||
GPU-Nvidia = false;
|
||||
### See https://nixos.wiki/wiki/Nvidia
|
||||
|
||||
GPU-Intel = false;
|
||||
### See https://nixos.wiki/wiki/Intel_Graphics
|
||||
|
||||
HotSpot-Use-Case = false;
|
||||
### See https://nixos.wiki/wiki/Internet_Connection_Sharing
|
||||
|
||||
## Software related
|
||||
QEMU-VM-Use-Case = true;
|
||||
|
||||
Database-Use-Case = true;
|
||||
### See https://github.com/qemu/qemu ; https://github.com/virt-manager/virt-manager
|
||||
|
||||
# Options
|
||||
|
||||
17
modules/services/mysql.nix
Normal file
17
modules/services/mysql.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ hostname, lib, pkgs, ... }:
|
||||
with lib; let
|
||||
inherit (import ../../hosts/${hostname}/env.nix) Database-Use-Case;
|
||||
in
|
||||
{
|
||||
config = mkIf Database-Use-Case {
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql84;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.dbeaver-bin
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,9 +46,6 @@ in {
|
||||
# For OBS virtual cam support
|
||||
v4l-utils
|
||||
|
||||
# Editor
|
||||
nano
|
||||
|
||||
# Networking tool
|
||||
iperf3
|
||||
nexttrace
|
||||
@@ -58,6 +55,7 @@ in {
|
||||
yt-dlp
|
||||
|
||||
#Android
|
||||
edl
|
||||
xxd
|
||||
file
|
||||
binwalk
|
||||
@@ -76,12 +74,22 @@ in {
|
||||
|
||||
# Dev
|
||||
go
|
||||
zig
|
||||
lua
|
||||
gcc
|
||||
gdb
|
||||
cmake
|
||||
clang
|
||||
zig
|
||||
nodejs_20
|
||||
gnumake
|
||||
rustc
|
||||
cargo
|
||||
dart
|
||||
kotlin
|
||||
flutter
|
||||
jdk17
|
||||
python312
|
||||
pnpm
|
||||
nodejs_20
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ with lib; {
|
||||
};
|
||||
};
|
||||
nixpkgs = {
|
||||
config.allowUnfree = false;
|
||||
config.allowUnfree = true;
|
||||
hostPlatform = "x86_64-linux";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user