Compare commits
3 commits
6a32cb9da2
...
655d5fdaf5
Author | SHA1 | Date | |
---|---|---|---|
655d5fdaf5 | |||
e68ce7fed7 | |||
8c63954273 |
23 changed files with 282 additions and 42 deletions
37
flake.lock
37
flake.lock
|
@ -2037,22 +2037,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_22": {
|
||||
"locked": {
|
||||
"lastModified": 1725634671,
|
||||
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1727634051,
|
||||
|
@ -2325,8 +2309,7 @@
|
|||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
"xdg-portal-hyprland": "xdg-portal-hyprland",
|
||||
"yazi": "yazi",
|
||||
"zen-browser": "zen-browser"
|
||||
"yazi": "yazi"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
|
@ -2928,24 +2911,6 @@
|
|||
"repo": "yazi",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_22"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730078377,
|
||||
"narHash": "sha256-OJL1P1rLD+O6BgITFJC/oapu6o+twvDsY6gBDmGR5nw=",
|
||||
"owner": "fufexan",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "6c22931e60beb805276a9eb31701047e6cb6afb2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fufexan",
|
||||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
eww.url = "github:elkowar/eww";
|
||||
anyrun.url = "github:Kirottu/anyrun";
|
||||
botoh.url = "git+https://git.flake.sh/notohh/botoh";
|
||||
zen-browser.url = "github:fufexan/zen-browser-flake";
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
imports = [
|
||||
./programs/editors/helix
|
||||
./programs/editors/neovim
|
||||
./programs/terminal/lazygit
|
||||
./programs/terminal/nushell
|
||||
./programs/terminal/yazi
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
../../services
|
||||
../../programs/anyrun
|
||||
../../programs/eww
|
||||
# ../../programs/browsers/firefox
|
||||
../../programs/browsers/firefox
|
||||
../../programs/terminal/wezterm
|
||||
../../programs/terminal/zellij
|
||||
../../programs/media/cava.nix
|
||||
../../programs/gtk.nix
|
||||
../../programs/qt.nix
|
||||
../../programs/mako.nix
|
||||
../../programs/media/spotify-player.nix
|
||||
../../programs/media/zathura.nix
|
||||
|
@ -25,14 +26,12 @@
|
|||
chromium
|
||||
vesktop
|
||||
technorino
|
||||
vscode-fhs
|
||||
obsidian
|
||||
signal-desktop
|
||||
thunderbird
|
||||
obs-studio
|
||||
pavucontrol
|
||||
anki-bin
|
||||
tomato-c
|
||||
virt-manager
|
||||
qbittorrent
|
||||
miru
|
||||
|
@ -51,12 +50,11 @@
|
|||
r2modman
|
||||
moonlight-qt
|
||||
kitty
|
||||
tetrio-desktop
|
||||
waydroid
|
||||
mousam
|
||||
inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
|
||||
inputs.zen-browser.packages.${pkgs.system}.default
|
||||
inputs.hyprsysteminfo.packages.${pkgs.system}.default
|
||||
inputs.hyprsunset.packages.${pkgs.system}.default
|
||||
(callPackage ../../../pkgs/passgen {})
|
||||
(callPackage ../../../pkgs/forex {})
|
||||
(callPackage ../../../pkgs/cpm {})
|
||||
|
|
61
home/programs/editors/neovim/default.nix
Normal file
61
home/programs/editors/neovim/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./plugins
|
||||
./themes
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
autoGroups = {
|
||||
vim_enter = {};
|
||||
};
|
||||
highlightOverride = {
|
||||
LspInlayHint.bg = "";
|
||||
};
|
||||
autoCmd = [
|
||||
{
|
||||
group = "vim_enter";
|
||||
event = ["VimEnter"];
|
||||
pattern = "*";
|
||||
command = "Neotree";
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
vim.wo.relativenumber = true
|
||||
'';
|
||||
extraConfigLuaPre = ''
|
||||
local slow_format_filetypes = {}
|
||||
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatToggle", function(args)
|
||||
if args.bang then
|
||||
-- Toggle formatting for current buffer
|
||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||
else
|
||||
-- Toggle formatting globally
|
||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||
end
|
||||
end, {
|
||||
desc = "Toggle autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
20
home/programs/editors/neovim/plugins/default.nix
Normal file
20
home/programs/editors/neovim/plugins/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
_: {
|
||||
imports = [
|
||||
./editor/neotree.nix
|
||||
./editor/trouble.nix
|
||||
./editor/autoclose.nix
|
||||
./editor/bufferline.nix
|
||||
./editor/autosave.nix
|
||||
./editor/treesitter.nix
|
||||
./lsp/lsp.nix
|
||||
./lsp/conform.nix
|
||||
./misc/wakatime.nix
|
||||
./misc/direnv.nix
|
||||
./misc/presence.nix
|
||||
./ui/lualine.nix
|
||||
./ui/mini.nix
|
||||
./ui/transparent.nix
|
||||
./ui/telescope.nix
|
||||
];
|
||||
programs.nixvim.plugins.web-devicons.enable = true;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.autoclose = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
3
home/programs/editors/neovim/plugins/editor/autosave.nix
Normal file
3
home/programs/editors/neovim/plugins/editor/autosave.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.auto-save.enable = true;
|
||||
}
|
17
home/programs/editors/neovim/plugins/editor/bufferline.nix
Normal file
17
home/programs/editors/neovim/plugins/editor/bufferline.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.bufferline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
highlight = "Directory";
|
||||
text = "File Explorer";
|
||||
text_align = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
home/programs/editors/neovim/plugins/editor/neotree.nix
Normal file
6
home/programs/editors/neovim/plugins/editor/neotree.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.neo-tree = {
|
||||
enable = true;
|
||||
enableDiagnostics = true;
|
||||
};
|
||||
}
|
16
home/programs/editors/neovim/plugins/editor/treesitter.nix
Normal file
16
home/programs/editors/neovim/plugins/editor/treesitter.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
json
|
||||
lua
|
||||
markdown
|
||||
nix
|
||||
regex
|
||||
toml
|
||||
xml
|
||||
yaml
|
||||
];
|
||||
};
|
||||
}
|
8
home/programs/editors/neovim/plugins/editor/trouble.nix
Normal file
8
home/programs/editors/neovim/plugins/editor/trouble.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.trouble = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_refresh = true;
|
||||
};
|
||||
};
|
||||
}
|
55
home/programs/editors/neovim/plugins/lsp/conform.nix
Normal file
55
home/programs/editors/neovim/plugins/lsp/conform.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
nix = [
|
||||
[
|
||||
"alejandra"
|
||||
]
|
||||
];
|
||||
};
|
||||
format_on_save = ''
|
||||
function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
|
||||
if slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||
return
|
||||
end
|
||||
|
||||
local function on_format(err)
|
||||
if err and err:match("timeout$") then
|
||||
slow_format_filetypes[vim.bo[bufnr].filetype] = true
|
||||
end
|
||||
end
|
||||
|
||||
return { timeout_ms = 200, lsp_fallback = true }, on_format
|
||||
end
|
||||
'';
|
||||
format_after_save = ''
|
||||
function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
|
||||
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||
return
|
||||
end
|
||||
|
||||
return { lsp_fallback = true }
|
||||
end
|
||||
'';
|
||||
formatters = {
|
||||
alejandra = {
|
||||
commmand = "${lib.getExe pkgs.alejandra}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
home/programs/editors/neovim/plugins/lsp/lsp.nix
Normal file
33
home/programs/editors/neovim/plugins/lsp/lsp.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
_: {
|
||||
programs.nixvim.plugins = {
|
||||
lsp-format.enable = true;
|
||||
lsp-lines.enable = true;
|
||||
lint = {
|
||||
lintersByFt = {
|
||||
nix = [
|
||||
"statix"
|
||||
];
|
||||
};
|
||||
linters = {
|
||||
statix = {
|
||||
cmd = ["statix"];
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
nil_ls = {
|
||||
enable = true;
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
home/programs/editors/neovim/plugins/misc/direnv.nix
Normal file
3
home/programs/editors/neovim/plugins/misc/direnv.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.direnv.enable = true;
|
||||
}
|
9
home/programs/editors/neovim/plugins/misc/presence.nix
Normal file
9
home/programs/editors/neovim/plugins/misc/presence.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.neocord = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_update = true;
|
||||
enable_line_number = true;
|
||||
};
|
||||
};
|
||||
}
|
3
home/programs/editors/neovim/plugins/misc/wakatime.nix
Normal file
3
home/programs/editors/neovim/plugins/misc/wakatime.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.wakatime.enable = true;
|
||||
}
|
5
home/programs/editors/neovim/plugins/ui/lualine.nix
Normal file
5
home/programs/editors/neovim/plugins/ui/lualine.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
5
home/programs/editors/neovim/plugins/ui/mini.nix
Normal file
5
home/programs/editors/neovim/plugins/ui/mini.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.mini = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
5
home/programs/editors/neovim/plugins/ui/telescope.nix
Normal file
5
home/programs/editors/neovim/plugins/ui/telescope.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
12
home/programs/editors/neovim/plugins/ui/transparent.nix
Normal file
12
home/programs/editors/neovim/plugins/ui/transparent.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
_: {
|
||||
programs.nixvim.plugins.transparent = {
|
||||
enable = true;
|
||||
settings = {
|
||||
extra_groups = [
|
||||
"NeoTreeNormal"
|
||||
"NeoTreeNormalNC"
|
||||
"NormalFloat"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
3
home/programs/editors/neovim/themes/default.nix
Normal file
3
home/programs/editors/neovim/themes/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [./tokyonight.nix];
|
||||
}
|
8
home/programs/editors/neovim/themes/tokyonight.nix
Normal file
8
home/programs/editors/neovim/themes/tokyonight.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
programs.nixvim.colorschemes.tokyonight = {
|
||||
enable = true;
|
||||
settings = {
|
||||
transparent = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue