chore: clean up tree-wide

This commit is contained in:
Mohammad Rafiq 2025-07-02 06:02:47 +08:00
parent 45afd6bea5
commit b9ad8ac2ca
No known key found for this signature in database
50 changed files with 247 additions and 511 deletions

View file

@ -1,12 +1,8 @@
{ inputs, pkgs, ... }:
{ pkgs, inputs, ... }:
{
imports = [ inputs.nix-index-database.hmModules.nix-index ];
programs = {
nh.enable = true;
tealdeer = {
enable = true;
enableAutoUpdates = true;
settings.updates.auto_update = true;
};
tealdeer.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
@ -19,22 +15,20 @@
home = {
shellAliases = {
windows = "sudo systemctl reboot --boot-loader-entry=auto-windows";
v = "nvim";
v = "$EDITOR";
e = "edit";
cd = "z";
cd = "z"; # zoxide
ai = "aichat -r %shell% -e";
};
packages = with pkgs; [
ripgrep
aichat
devenv
pantheon.rebuild
pantheon.deploy
pantheon.edit
pantheon.commit
];
};
xdg.configFile."aichat/config.yaml".text = ''
model: gemini:gemini-2.0-flash
clients:

View file

@ -3,28 +3,23 @@
blink-cmp = {
enable = true;
friendly-snippets.enable = true;
sourcePlugins = {
ripgrep.enable = true;
};
sourcePlugins.ripgrep.enable = true;
setupOpts = {
completion.documentation.auto_show_delay_ms = 0;
signature.enabled = true;
# Disable completion in markdown files
# TODO: Disable completion when in comments
enabled =
lib.generators.mkLuaInline
# lua
''
--- Disable completion for markdown
function()
return not vim.tbl_contains({"markdown"}, vim.bo.filetype)
and vim.bo.buftype ~= "prompt"
and vim.b.completion ~= false
end
'';
cmdline = {
enabled = true;
sources = null;
completion.menu.auto_show = false;
};
completion.documentation.auto_show_delay_ms = 0;
# Show e.g. function parameters
signature.enabled = true;
};
};
}

View file

@ -1,15 +1,6 @@
{
hardtime-nvim = {
enable = true;
setupOpts = {
max_count = 1;
disabled_keys = {
"<Up>" = [ ];
"<Down>" = [ ];
"<Right>" = [ ];
"<Left>" = [ ];
};
};
};
hardtime-nvim.enable = true;
# Hint when movements are inefficient but don't block
hardtime-nvim.setupOpts.restriction_mode = "hint";
whichKey.enable = true;
}

View file

@ -1,23 +0,0 @@
[
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
{
desc = "";
key = "<C-u>";
mode = "n";
action = "<C-u>zz";
silent = true;
}
{
desc = "";
key = "<C-d>";
mode = "n";
action = "<C-d>zz";
silent = true;
}
]

View file

@ -1,7 +1,9 @@
{
enable = true;
# Show virtual text hints
inlayHints.enable = true;
lightbulb.enable = true;
# Show icons for lsp actions
lspkind.enable = true;
null-ls.enable = true;
otter-nvim = {

View file

@ -1,3 +0,0 @@
{
todo-comments.enable = true;
}

View file

@ -1,9 +0,0 @@
{
autoindent = true;
backspace = "indent,eol,start";
cursorline = true;
expandtab = true;
shiftwidth = 2;
smartindent = true;
tabstop = 2;
}

View file

@ -1,6 +0,0 @@
{
autotagHtml = true;
fold = true;
indent.disable = [ "markdown" ];
textobjects.enable = true;
}

View file

@ -4,10 +4,13 @@
globalStyle = "rounded";
};
breadcrumbs.enable = true;
# Show color values e.g. #ffffff
colorizer.enable = true;
# Highlight matching symbols
illuminate.enable = true;
noice.enable = true;
noice.setupOpts.notify.enabled = false;
# Make folds look nicer
nvim-ufo.enable = true;
smartcolumn.enable = true;
}

View file

@ -1,6 +1,4 @@
{
ccc.enable = true;
mkdir.enable = true;
motion.hop.enable = true;
yazi-nvim = {
enable = true;

View file

@ -2,7 +2,6 @@
indent-blankline.enable = true;
fidget-nvim.enable = true;
fidget-nvim.setupOpts.notification.override_vim_notify = true;
nvim-cursorline.enable = true;
nvim-web-devicons.enable = true;
rainbow-delimiters.enable = true;
}

View file

@ -1,31 +1,45 @@
{ lib, pkgs, ... }:
let
inherit (lib) singleton;
in
{
pkgs,
lib,
inputs,
...
}:
{
imports = [ inputs.nvf.homeManagerModules.default ];
home.sessionVariables.EDITOR = "nvim";
persistDirs = singleton ".local/share/nvf";
programs.nvf.enable = true;
programs.nvf.settings.vim = {
hideSearchHighlight = true;
syntaxHighlighting = true;
telescope.enable = true;
hideSearchHighlight = true;
searchCase = "ignore";
undoFile.enable = true;
telescope.enable = true;
fzf-lua.enable = true;
git.enable = true;
undoFile.enable = true;
autopairs.nvim-autopairs.enable = true;
autocomplete = import ./_nvf/autocomplete.nix { inherit lib; };
binds = import ./_nvf/binds.nix;
keymaps = import ./_nvf/keymaps.nix;
languages = import ./_nvf/languages.nix;
lsp = import ./_nvf/lsp.nix;
navigation = import ./_nvf/navigation.nix;
notes = import ./_nvf/notes.nix;
options = import ./_nvf/options.nix;
notes.todo-comments.enable = true;
options = {
autoindent = true;
backspace = "indent,eol,start";
cursorline = true;
expandtab = true;
shiftwidth = 2;
smartindent = true;
tabstop = 2;
};
snippets = import ./_nvf/snippets.nix { inherit pkgs; };
statusline = import ./_nvf/statusline.nix;
treesitter = import ./_nvf/treesitter.nix;
treesitter = {
autotagHtml = true;
fold = true;
indent.disable = [ "markdown" ];
textobjects.enable = true;
};
ui = import ./_nvf/ui.nix;
utility = import ./_nvf/utility.nix;
visuals = import ./_nvf/visuals.nix;

View file

@ -1,10 +1,7 @@
{ lib, pkgs, ... }:
let
inherit (lib) singleton;
in
{ pkgs, ... }:
{
home = {
packages = singleton pkgs.fastfetch;
packages = [ pkgs.fastfetch ];
sessionVariables.FETCH = "hyfetch";
shellAliases.fetch = "hyfetch";
};
@ -16,8 +13,8 @@ in
light_dark = "dark";
lightness = 0.5;
color_align = {
# Flag color alignment
mode = "horizontal";
custom_colors = [ ];
fore_back = null;
};
backend = "fastfetch";

View file

@ -3,18 +3,6 @@
programs.yazi = {
enable = true;
shellWrapperName = "t";
settings = {
mgr = {
sort_by = "natural";
};
opener = {
play = [
{
run = "vlc \"$@\"";
desc = "Open";
}
];
};
};
settings.mgr.sort_by = "natural";
};
}

View file

@ -1,6 +1,5 @@
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.fzf.enable = true;
#TODO: fish
programs.fzf.enableZshIntegration = true;
}

View file

@ -4,11 +4,16 @@
pkgs,
...
}:
let
zjstatus = inputs.zjstatus.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
home.sessionVariables.MULTIPLEXER = "zellij";
# Persists sessions
persistDirs = [ "/.cache/zellij" ];
programs.zellij = {
enable = true;
#TODO: fish
enableZshIntegration = true;
settings = {
pane_frames = false;
@ -19,44 +24,38 @@
xdg.configFile."zellij/layouts/default.kdl".text = # kdl
''
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="file:${
inputs.zjstatus.packages.${pkgs.stdenv.hostPlatform.system}.default
}/bin/zjstatus.wasm" {
format_left "{mode} ${osConfig.hostname}"
format_center "{tabs}"
format_right "{datetime}"
format_space ""
format_hide_on_overlength "true"
format_precedence "lrc"
default_tab_template {
pane size=1 borderless=true {
plugin location="file:${zjstatus}/bin/zjstatus.wasm" {
format_left "{mode} ${osConfig.hostname}"
format_center "{tabs}"
format_right "{datetime}"
format_space ""
format_hide_on_overlength "true"
format_precedence "lrc"
border_enabled "false"
border_char ""
border_format "#[fg=#6C7086]{char}"
border_position "top"
border_enabled "false"
hide_frame_for_single_pane "false"
hide_frame_for_single_pane "false"
mode_default_to_mode "normal"
mode_normal "#[bg=#89B4FA] {name} "
mode_locked "#[bg=#f55e18] {name} "
mode_session "#[bg=#00ff00] {name} "
mode_default_to_mode "normal"
mode_normal "#[bg=#89B4FA] {name} "
mode_locked "#[bg=#f55e18] {name} "
mode_session "#[bg=#00ff00] {name} "
tab_normal "#[fg=#6C7086] {index} "
tab_active "#[fg=#9399B2,bold,italic] {index} "
tab_display_count "3" // limit to showing 3 tabs
tab_truncate_start_format "..."
tab_truncate_end_format "..."
tab_normal "#[fg=#6C7086] {index} "
tab_active "#[fg=#9399B2,bold,italic] {index} "
tab_display_count "3" // limit to showing 3 tabs
tab_truncate_start_format "..."
tab_truncate_end_format "..."
//TODO: disable if we are not on ssh
datetime "#[fg=#6C7086,bold] {format}"
datetime_format "%H:%M:%S"
datetime_timezone "Asia/Singapore"
}
}
children
//TODO: disable if we are not on ssh
datetime "#[fg=#6C7086,bold] {format}"
datetime_format "%H:%M:%S"
datetime_timezone "Asia/Singapore"
}
}
children
}
}
'';
}

View file

@ -1,12 +1,13 @@
{ lib, pkgs, ... }:
let
inherit (builtins) toString;
inherit (lib) mkOrder;
inherit (lib) getExe mkOrder;
screensaverTimeout = toString 100;
screensaverCommand = "${pkgs.cbonsai}/bin/cbonsai -S -w 0.1 -L 40 -M 2 -b 2";
screensaverCommand = "${getExe pkgs.cbonsai} -S -w 0.1 -L 40 -M 2 -b 2";
in
{
home.shell.enableShellIntegration = true;
#TODO: change to fish
home.sessionVariables.SHELL = "zsh";
programs.zsh = {
enable = true;

View file

@ -4,6 +4,7 @@ let
in
{
programs.starship = {
#TODO: enable after switching to fish
enable = false;
# settings = {
# add_newline = false;