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;

View file

@ -11,13 +11,5 @@ in
{
imports =
(optional osConfig.desktop.enable (import-tree ./desktop))
++ singleton (import-tree ./cli)
++ [
inputs.nix-index-database.hmModules.nix-index
inputs.nvf.homeManagerModules.default
];
config = {
stylix.image = ./desktop/wallpaper.png;
};
++ singleton (import-tree ./cli);
}

View file

@ -1,13 +1,13 @@
{
lib,
inputs,
system,
pkgs,
...
}:
let
inherit (builtins) map listToAttrs;
inherit (lib.lists) findFirstIndex;
inherit (inputs.nur.legacyPackages.${system}.repos.rycee) firefox-addons;
inherit (inputs.nur.legacyPackages.${pkgs.stdenv.hostPlatform.system}.repos.rycee) firefox-addons;
profiles = listToAttrs (
map (name: {
inherit name;
@ -36,6 +36,11 @@ let
in
{
home.sessionVariables.BROWSER = "firefox";
programs.firefox = { inherit profiles; };
persistDirs = [ ".mozilla/firefox" ];
programs.firefox = {
enable = true;
inherit profiles;
};
stylix.targets.firefox.colorTheme.enable = true;
stylix.targets.firefox.profileNames = syncedProfiles;
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
persistDirs = [
"docs"
"repos"
"vids"
"tmp"
".cache/Smart Code ltd/Stremio"
".local/share/Smart Code ltd/Stremio"
];
programs = {
obs-studio.enable = true;
vesktop.enable = true;
thunderbird.enable = true;
thunderbird.profiles.rafiq.isDefault = true;
};
home.packages = with pkgs; [ stremio ];
stylix.image = ./wallpaper.png;
}

View file

@ -1,7 +1,3 @@
{
home.sessionVariables.LAUNCHER = "fuzzel";
programs.wofi = {
style = null;
settings = { };
};
}

View file

@ -1,35 +1,29 @@
let
styling = {
halign = "center";
valign = "center";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
in
{
home.sessionVariables.LOCKSCREEN = "hyprlock";
programs.hyprlock.settings = {
general.hide_cursor = true;
general.ignore_empty_input = true;
background = {
blur_passes = 5;
blur_size = 5;
};
background.blur_passes = 5;
background.blur_size = 5;
label = {
text = ''hi, $USER.'';
font_size = 32;
halign = "center";
valign = "center";
position = "0, 0";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
}// styling;
input-field = {
placeholder_text = "";
fade_on_empty = true;
size = "200, 45";
halign = "center";
valign = "center";
position = "0, -5%";
placeholder_text = "";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
} // styling;
};
}

View file

@ -1,26 +0,0 @@
{ pkgs, ... }:
{
persistDirs = [
"docs"
"repos"
"vids"
"tmp"
".cache/Smart Code ltd/Stremio"
".local/share/Smart Code ltd/Stremio"
];
programs = {
obs-studio.enable = true;
vesktop = {
enable = true;
# https://github.com/Vencord/Vesktop/blob/main/src/shared/settings.d.ts
settings = { };
# https://github.com/Vendicated/Vencord/blob/main/src/api/Settings.ts
vencord.settings = { };
};
thunderbird.enable = true;
thunderbird.profiles.rafiq.isDefault = true;
};
home.packages = with pkgs; [
stremio
];
}

View file

@ -1,6 +1,5 @@
{
home.sessionVariables.NOTIFICATION_DAEMON = "mako";
services.mako.settings = {
default-timeout = 10000;
};
services.mako.enable = true;
services.mako.settings.default-timeout = 10000;
}

View file

@ -3,6 +3,7 @@
home.sessionVariables.STATUS_BAR = "waybar";
stylix.targets.waybar.addCss = false;
programs.waybar = {
enable = true;
settings = [
{
#TODO: review the rest of the modules to see what else can be added

View file

@ -1,5 +1,5 @@
{
home.sessionVariables.TERMINAL = "ghostty -e";
#TODO: fix image preview
programs.ghostty.enable = true;
programs.ghostty.settings.confirm-close-surface = false;
}

View file

@ -6,10 +6,12 @@
"$hypr, Q, exec, uwsm stop"
"SUPER, W, killactive"
"SUPER, return, exec, uwsm app -- $TERMINAL $MULTIPLEXER"
"SUPER, return, exec, uwsm app -- $TERMINAL"
"SUPER, O, exec, uwsm app -- $BROWSER"
"SUPER, Escape, exec, uwsm app -- $LOCKSCREEN"
#TODO:add file browser
#TODO: make it directional
"SUPER, H, cyclenext, visible"
"SUPER, L, cyclenext, visible prev"
"SUPER_ALT, H, movewindow, l"
@ -20,25 +22,28 @@
"ALT_SHIFT, J, resizeactive, 0 -10%"
"ALT_SHIFT, K, resizeactive, 0 10%"
"ALT_SHIFT, L, resizeactive, 10% 0"
"$hypr, V, togglefloating"
"SUPER_CTRL, H, workspace, r-1"
"SUPER_CTRL, L, workspace, r+1"
"$hypr, H, movetoworkspace, r-1"
"$hypr, L, movetoworkspace, r+1"
"$hypr, V, togglefloating"
];
bindr = [
# Activates on SUPER without any other modifier
"SUPER, Super_L, exec, uwsm app -- $($LAUNCHER --launch-prefix=\"uwsm app -- \")"
];
bindle = [
"SUPER, 6, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
"SUPER, 6, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
"SUPER, 7, exec, ${pkgs.playerctl}/bin/playerctl previous"
"SUPER, 8, exec, ${pkgs.playerctl}/bin/playerctl -a play-pause"
"SUPER, 9, exec, ${pkgs.playerctl}/bin/playerctl next"
"SUPER, 0, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
"$meh, mouse_up, resizeactive, 10% 10%"
"$meh, mouse_down, resizeactive, -10% -10%"
"SUPER, 0, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
"ALT, mouse_up, resizeactive, 10% 10%"
"ALT, mouse_down, resizeactive, -10% -10%"
];
bindm = [

View file

@ -1,30 +0,0 @@
{
lib,
pkgs,
osConfig,
...
}:
let
inherit (lib) mkMerge;
inherit (osConfig.desktop) mainMonitor;
in
mkMerge [
(import ./decoration.nix)
(import ./keybinds.nix { inherit pkgs; })
{
ecosystem.no_update_news = true;
xwayland.force_zero_scaling = true;
monitor = [
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
", preferred, auto, 1"
];
exec-once = [
"uwsm app -- $LOCKSCREEN"
"uwsm app -- $NOTIFICATION_DAEMON"
"uwsm app -- $STATUS_BAR"
];
}
]

View file

@ -1,12 +1,21 @@
{ lib, pkgs, ... }:
let
inherit (lib) mkMerge;
in
{
lib,
pkgs,
osConfig,
...
}:
{
wayland.windowManager.hyprland.settings = import ./_hyprland/settings.nix {
inherit pkgs osConfig lib;
};
wayland.windowManager.hyprland.settings = mkMerge [
(import ./_hyprland/decoration.nix)
(import ./_hyprland/keybinds.nix { inherit pkgs; })
{
ecosystem.no_update_news = true;
xwayland.force_zero_scaling = true;
monitor = [ ", preferred, auto, 1" ];
exec-once = [
"uwsm app -- $LOCKSCREEN"
"uwsm app -- $NOTIFICATION_DAEMON"
"uwsm app -- $STATUS_BAR"
];
}
];
# TODO: add gamescope here or in nixos desktop module
}