diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-12 18:48:40 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-12 18:48:40 +0530 |
| commit | 51d537e03ad877566f00af3c6a1c00340512ac65 (patch) | |
| tree | 7f8e1c6fccc68ba2ad7c3a2a02fb6efbc36d37d3 /modules/tools | |
| parent | d6ccf7e455bd6947664d4a44dfe578813fa2b4eb (diff) | |
| download | home-manager-config-51d537e03ad877566f00af3c6a1c00340512ac65.tar.gz home-manager-config-51d537e03ad877566f00af3c6a1c00340512ac65.zip | |
Using spaces instead of tabs
Diffstat (limited to 'modules/tools')
50 files changed, 971 insertions, 960 deletions
diff --git a/modules/tools/atac/default.nix b/modules/tools/atac/default.nix index bc28761..5babb7b 100644 --- a/modules/tools/atac/default.nix +++ b/modules/tools/atac/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.atac = { - enable = lib.mkEnableOption "Enables atac."; - }; - - config = lib.mkIf config.tools.atac.enable { - home.packages = with pkgs; [ - atac - ]; - }; + options.tools.atac = { + enable = lib.mkEnableOption "Enables atac."; + }; + + config = lib.mkIf config.tools.atac.enable { + home.packages = with pkgs; [ + atac + ]; + }; } diff --git a/modules/tools/bluetui/default.nix b/modules/tools/bluetui/default.nix index 0555b44..fa227a9 100644 --- a/modules/tools/bluetui/default.nix +++ b/modules/tools/bluetui/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.bluetui = { - enable = lib.mkEnableOption "Enables bluetui."; - }; - - config = lib.mkIf config.tools.bluetui.enable { - home.packages = with pkgs; [ - bluetui - ]; - }; + options.tools.bluetui = { + enable = lib.mkEnableOption "Enables bluetui."; + }; + + config = lib.mkIf config.tools.bluetui.enable { + home.packages = with pkgs; [ + bluetui + ]; + }; } diff --git a/modules/tools/bottles/default.nix b/modules/tools/bottles/default.nix index e9261dc..10ab05a 100644 --- a/modules/tools/bottles/default.nix +++ b/modules/tools/bottles/default.nix @@ -1,15 +1,15 @@ { config, pkgs, lib, ... }: { - options.tools.bottles = { - enable = lib.mkEnableOption "Enables bottles."; - }; - - config = lib.mkIf config.tools.bottles.enable { - home.packages = with pkgs; [ - (bottles.override { - removeWarningPopup = true; - }) - ]; - }; + options.tools.bottles = { + enable = lib.mkEnableOption "Enables bottles."; + }; + + config = lib.mkIf config.tools.bottles.enable { + home.packages = with pkgs; [ + (bottles.override { + removeWarningPopup = true; + }) + ]; + }; } diff --git a/modules/tools/bottom/default.nix b/modules/tools/bottom/default.nix index e330576..9c0bb0d 100644 --- a/modules/tools/bottom/default.nix +++ b/modules/tools/bottom/default.nix @@ -1,11 +1,11 @@ { config, lib, ... }: { - options.tools.bottom = { - enable = lib.mkEnableOption "Enables bottom."; - }; - - config = lib.mkIf config.tools.bottom.enable { - programs.bottom.enable = true; - }; + options.tools.bottom = { + enable = lib.mkEnableOption "Enables bottom."; + }; + + config = lib.mkIf config.tools.bottom.enable { + programs.bottom.enable = true; + }; } diff --git a/modules/tools/brightnessctl/default.nix b/modules/tools/brightnessctl/default.nix index 7c539a9..7b0aa51 100644 --- a/modules/tools/brightnessctl/default.nix +++ b/modules/tools/brightnessctl/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.brightnessctl = { - enable = lib.mkEnableOption "Enables brightnessctl."; - }; - - config = lib.mkIf config.tools.brightnessctl.enable { - home.packages = with pkgs; [ - brightnessctl - ]; - }; + options.tools.brightnessctl = { + enable = lib.mkEnableOption "Enables brightnessctl."; + }; + + config = lib.mkIf config.tools.brightnessctl.enable { + home.packages = with pkgs; [ + brightnessctl + ]; + }; } diff --git a/modules/tools/cloudflare-warp/default.nix b/modules/tools/cloudflare-warp/default.nix index d644dee..4e55d9b 100644 --- a/modules/tools/cloudflare-warp/default.nix +++ b/modules/tools/cloudflare-warp/default.nix @@ -1,13 +1,13 @@ { config, pkgs, lib, ... }: { - options.tools.cloudflare-warp = { - enable = lib.mkEnableOption "Enables CloudFlare Warp VPN."; - }; - - config = lib.mkIf config.tools.cloudflare-warp.enable { - home.packages = with pkgs; [ - cloudflare-warp - ]; - }; + options.tools.cloudflare-warp = { + enable = lib.mkEnableOption "Enables CloudFlare Warp VPN."; + }; + + config = lib.mkIf config.tools.cloudflare-warp.enable { + home.packages = with pkgs; [ + cloudflare-warp + ]; + }; } diff --git a/modules/tools/default.nix b/modules/tools/default.nix index f30a43f..a442dde 100644 --- a/modules/tools/default.nix +++ b/modules/tools/default.nix @@ -1,40 +1,40 @@ { ... }: { - imports = [ - ./atac - ./bluetui - ./bottles - ./bottom - ./brightnessctl - ./cloudflare-warp - ./devenv - ./fastfetch - ./feh - ./fzf - ./git - ./htop - ./impala - ./kitty - ./libreoffice - ./librewolf - ./lsd - ./maim - ./nixvim - ./nnn - ./nvtop - ./pamixer - ./playerctl - ./rofi - ./starship - ./steam - ./systemctl-tui - ./tmux - ./tor-browser - ./unar - ./vlc - ./vscode - ./zathura - ./zsh - ]; + imports = [ + ./atac + ./bluetui + ./bottles + ./bottom + ./brightnessctl + ./cloudflare-warp + ./devenv + ./fastfetch + ./feh + ./fzf + ./git + ./htop + ./impala + ./kitty + ./libreoffice + ./librewolf + ./lsd + ./maim + ./nixvim + ./nnn + ./nvtop + ./pamixer + ./playerctl + ./rofi + ./starship + ./steam + ./systemctl-tui + ./tmux + ./tor-browser + ./unar + ./vlc + ./vscode + ./zathura + ./zsh + ]; } diff --git a/modules/tools/devenv/default.nix b/modules/tools/devenv/default.nix index a77149b..56574b7 100644 --- a/modules/tools/devenv/default.nix +++ b/modules/tools/devenv/default.nix @@ -1,32 +1,32 @@ { config, pkgs, lib, ... }: { - options.tools.devenv = { - enable = lib.mkEnableOption "Enables devenv."; - }; + options.tools.devenv = { + enable = lib.mkEnableOption "Enables devenv."; + }; - config = let - # Use --no-reload by default for devenv shell - shellIntegration = '' + config = let + # Use --no-reload by default for devenv shell + shellIntegration = '' devenv() { - for arg in "$@"; do - if [[ "$arg" == "--reload" || "$arg" == "--no-reload" ]]; then - command devenv "$@" - return - fi - done + for arg in "$@"; do + if [[ "$arg" == "--reload" || "$arg" == "--no-reload" ]]; then + command devenv "$@" + return + fi + done - command devenv "$@" --no-reload + command devenv "$@" --no-reload } ''; - in lib.mkIf config.tools.devenv.enable { - home.packages = with pkgs; [ - devenv - ]; - - programs.zsh.initContent = lib.mkIf config.programs.zsh.enable - (lib.mkAfter shellIntegration); - programs.bash.initExtra = lib.mkIf config.programs.bash.enable - (lib.mkAfter shellIntegration); - }; + in lib.mkIf config.tools.devenv.enable { + home.packages = with pkgs; [ + devenv + ]; + + programs.zsh.initContent = lib.mkIf config.programs.zsh.enable + (lib.mkAfter shellIntegration); + programs.bash.initExtra = lib.mkIf config.programs.bash.enable + (lib.mkAfter shellIntegration); + }; } diff --git a/modules/tools/fastfetch/default.nix b/modules/tools/fastfetch/default.nix index edd1873..25e6a3a 100644 --- a/modules/tools/fastfetch/default.nix +++ b/modules/tools/fastfetch/default.nix @@ -1,13 +1,13 @@ { config, lib, ... }: { - options.tools.fastfetch = { - enable = lib.mkEnableOption "Enables fastfetch."; - }; - - config = lib.mkIf config.tools.fastfetch.enable { - programs.fastfetch = { - enable = true; - }; - }; + options.tools.fastfetch = { + enable = lib.mkEnableOption "Enables fastfetch."; + }; + + config = lib.mkIf config.tools.fastfetch.enable { + programs.fastfetch = { + enable = true; + }; + }; } diff --git a/modules/tools/feh/default.nix b/modules/tools/feh/default.nix index c7412f2..986ae13 100644 --- a/modules/tools/feh/default.nix +++ b/modules/tools/feh/default.nix @@ -1,11 +1,11 @@ { config, lib, ... }: { - options.tools.feh = { - enable = lib.mkEnableOption "Enables feh."; - }; + options.tools.feh = { + enable = lib.mkEnableOption "Enables feh."; + }; - config = lib.mkIf config.tools.feh.enable { - programs.feh.enable = true; - }; + config = lib.mkIf config.tools.feh.enable { + programs.feh.enable = true; + }; } diff --git a/modules/tools/fzf/default.nix b/modules/tools/fzf/default.nix index 3d19eca..27350d4 100644 --- a/modules/tools/fzf/default.nix +++ b/modules/tools/fzf/default.nix @@ -1,56 +1,56 @@ { config, lib,... }: { - options.tools.fzf = { - enable = lib.mkEnableOption "Enables fzf."; - }; - - config = let - shellIntegration = '' + options.tools.fzf = { + enable = lib.mkEnableOption "Enables fzf."; + }; + + config = let + shellIntegration = '' ${if config.tools.zsh.enable then - "eval \"$(fzf --zsh)\"" + "eval \"$(fzf --zsh)\"" else "eval \"$(fzf --bash)\""} - ''; - in lib.mkIf config.tools.fzf.enable { - programs.fzf = { - enable = true; - - defaultOptions = [ - "--height 100%" - "--layout=reverse" - ''--pointer=\" \"'' - ''--header=\" \"'' - ''--prompt=\" \"'' - ''--marker=\"✓ \"'' - "--border=none" - "--cycle" - "--no-info" - "--margin=\"1,2\"" - ]; - - colors = with config.scheme.withHashtag; { - fg = base05; # Foreground - bg = "-1"; # Background (-1 for transparent) - hl = base0D; # Highlight - - "fg+" = base07; # Foreground for selected item - "bg+" = "-1"; # Background for selected item - "hl+" = base0D; # Highlight for selected item - - gutter = "-1"; # Remove the white margin at the left - - info = base0B; # Info text (usually count of items) - border = base03; # Border color - prompt = base0A; # Prompt text color - pointer = base0F; # Pointer color (e.g., > for selected) - marker = base0C; # Marker color (e.g., for multi-select) - spinner = base0C; # Spinner color (during search) - }; - }; - - programs.zsh.initContent = lib.mkIf config.programs.zsh.enable - (lib.mkAfter shellIntegration); - programs.bash.initExtra = lib.mkIf config.programs.bash.enable - (lib.mkAfter shellIntegration); - }; + ''; + in lib.mkIf config.tools.fzf.enable { + programs.fzf = { + enable = true; + + defaultOptions = [ + "--height 100%" + "--layout=reverse" + ''--pointer=\" \"'' + ''--header=\" \"'' + ''--prompt=\" \"'' + ''--marker=\"✓ \"'' + "--border=none" + "--cycle" + "--no-info" + "--margin=\"1,2\"" + ]; + + colors = with config.scheme.withHashtag; { + fg = base05; # Foreground + bg = "-1"; # Background (-1 for transparent) + hl = base0D; # Highlight + + "fg+" = base07; # Foreground for selected item + "bg+" = "-1"; # Background for selected item + "hl+" = base0D; # Highlight for selected item + + gutter = "-1"; # Remove the white margin at the left + + info = base0B; # Info text (usually count of items) + border = base03; # Border color + prompt = base0A; # Prompt text color + pointer = base0F; # Pointer color (e.g., > for selected) + marker = base0C; # Marker color (e.g., for multi-select) + spinner = base0C; # Spinner color (during search) + }; + }; + + programs.zsh.initContent = lib.mkIf config.programs.zsh.enable + (lib.mkAfter shellIntegration); + programs.bash.initExtra = lib.mkIf config.programs.bash.enable + (lib.mkAfter shellIntegration); + }; } diff --git a/modules/tools/git/default.nix b/modules/tools/git/default.nix index 09ac973..c3e6dd1 100644 --- a/modules/tools/git/default.nix +++ b/modules/tools/git/default.nix @@ -1,35 +1,35 @@ { lib, config, ... }: { - options.tools.git = { - enable = lib.mkEnableOption "Enables git."; - username = lib.mkOption { - type = lib.types.str; - description = "Git username."; - }; - email = lib.mkOption { - type = lib.types.str; - description = "Git email."; - }; - }; - - config = lib.mkIf config.tools.git.enable { - programs.git = { - enable = true; - settings = { - user = { - name = config.tools.git.username; - email = config.tools.git.email; - }; - credential.helper = "store --file ${config.xdg.cacheHome}/git/credential"; - core.askPass = ""; - }; - }; - - # The base directory of the credential file must exist - home.activation.createGitCacheDirectory - = lib.hm.dag.entryAfter - [ "writeBoundary" ] - "mkdir -p ${config.xdg.cacheHome}/git"; - }; + options.tools.git = { + enable = lib.mkEnableOption "Enables git."; + username = lib.mkOption { + type = lib.types.str; + description = "Git username."; + }; + email = lib.mkOption { + type = lib.types.str; + description = "Git email."; + }; + }; + + config = lib.mkIf config.tools.git.enable { + programs.git = { + enable = true; + settings = { + user = { + name = config.tools.git.username; + email = config.tools.git.email; + }; + credential.helper = "store --file ${config.xdg.cacheHome}/git/credential"; + core.askPass = ""; + }; + }; + + # The base directory of the credential file must exist + home.activation.createGitCacheDirectory + = lib.hm.dag.entryAfter + [ "writeBoundary" ] + "mkdir -p ${config.xdg.cacheHome}/git"; + }; } diff --git a/modules/tools/htop/default.nix b/modules/tools/htop/default.nix index 9b61fb2..c177d1d 100644 --- a/modules/tools/htop/default.nix +++ b/modules/tools/htop/default.nix @@ -1,14 +1,14 @@ { pkgs, lib, config, ... }: { - options.tools.htop = { - enable = lib.mkEnableOption "Enables htop."; - }; - - config = lib.mkIf config.tools.htop.enable { - programs.htop = { - enable = true; - package = pkgs.htop-vim; - }; - }; + options.tools.htop = { + enable = lib.mkEnableOption "Enables htop."; + }; + + config = lib.mkIf config.tools.htop.enable { + programs.htop = { + enable = true; + package = pkgs.htop-vim; + }; + }; } diff --git a/modules/tools/impala/default.nix b/modules/tools/impala/default.nix index 7a80c6d..86eed5e 100644 --- a/modules/tools/impala/default.nix +++ b/modules/tools/impala/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.impala = { - enable = lib.mkEnableOption "Enables impala."; - }; - - config = lib.mkIf config.tools.impala.enable { - home.packages = with pkgs; [ - impala - ]; - }; + options.tools.impala = { + enable = lib.mkEnableOption "Enables impala."; + }; + + config = lib.mkIf config.tools.impala.enable { + home.packages = with pkgs; [ + impala + ]; + }; } diff --git a/modules/tools/kitty/default.nix b/modules/tools/kitty/default.nix index 3fd298e..2162893 100644 --- a/modules/tools/kitty/default.nix +++ b/modules/tools/kitty/default.nix @@ -1,51 +1,51 @@ { config, lib, ... }: { - options.tools.kitty = { - enable = lib.mkEnableOption "Enables kitty. WARNING! Currently faces problems with color rendering with picom."; - }; - - config = lib.mkIf config.tools.kitty.enable { - programs.kitty = { - enable = true; - settings = with config.scheme.withHashtag; { - window_padding_width = 10; - font_size = config.fonts.size; - font_family = config.fonts.normal; - filter_notification = "all"; - update_check_interval = 0; - scrollback_indicator_opacity = "0.5"; - - dynamic_background_opacity = false; - enable_audio_bell = false; - - background = base00; - foreground = base05; - - color0 = base00; - color1 = base08; - color2 = base0B; - color3 = base0A; - color4 = base0D; - color5 = base0E; - color6 = base0C; - color7 = base05; - color8 = base03; - color9 = base09; - color10 = base0B; - color11 = base0A; - color12 = base0D; - color13 = base0E; - color14 = base0F; - color15 = base07; - - selection_background = base05; - selection_foreground = base00; - - allow_remote_control = "yes"; - listen_on = "unix:/tmp/kitty"; - shell = lib.mkIf config.tools.zsh.enable "zsh"; - }; - }; - }; + options.tools.kitty = { + enable = lib.mkEnableOption "Enables kitty. WARNING! Currently faces problems with color rendering with picom."; + }; + + config = lib.mkIf config.tools.kitty.enable { + programs.kitty = { + enable = true; + settings = with config.scheme.withHashtag; { + window_padding_width = 10; + font_size = config.fonts.size; + font_family = config.fonts.normal; + filter_notification = "all"; + update_check_interval = 0; + scrollback_indicator_opacity = "0.5"; + + dynamic_background_opacity = false; + enable_audio_bell = false; + + background = base00; + foreground = base05; + + color0 = base00; + color1 = base08; + color2 = base0B; + color3 = base0A; + color4 = base0D; + color5 = base0E; + color6 = base0C; + color7 = base05; + color8 = base03; + color9 = base09; + color10 = base0B; + color11 = base0A; + color12 = base0D; + color13 = base0E; + color14 = base0F; + color15 = base07; + + selection_background = base05; + selection_foreground = base00; + + allow_remote_control = "yes"; + listen_on = "unix:/tmp/kitty"; + shell = lib.mkIf config.tools.zsh.enable "zsh"; + }; + }; + }; } diff --git a/modules/tools/libreoffice/default.nix b/modules/tools/libreoffice/default.nix index c73d7ab..12fbf75 100644 --- a/modules/tools/libreoffice/default.nix +++ b/modules/tools/libreoffice/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.libreoffice = { - enable = lib.mkEnableOption "Enables libreoffice."; - }; - - config = lib.mkIf config.tools.libreoffice.enable { - home.packages = with pkgs; [ - libreoffice - ]; - }; + options.tools.libreoffice = { + enable = lib.mkEnableOption "Enables libreoffice."; + }; + + config = lib.mkIf config.tools.libreoffice.enable { + home.packages = with pkgs; [ + libreoffice + ]; + }; } diff --git a/modules/tools/librewolf/default.nix b/modules/tools/librewolf/default.nix index aa10982..c093337 100644 --- a/modules/tools/librewolf/default.nix +++ b/modules/tools/librewolf/default.nix @@ -1,57 +1,57 @@ { config, lib, pkgs, ... }: { - options.tools.librewolf = { - enable = lib.mkEnableOption "Enables librewolf."; - }; - - config = lib.mkIf config.tools.librewolf.enable { - programs.librewolf = { - enable = true; - package = pkgs.librewolf; - profiles."arpit" = { - isDefault = true; - settings = { - "extensions.autoDisableScopes" = 0; - # Use default dark theme until Black gets installed - "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; - "sidebar.verticalTabs" = true; - "sidebar.visibility" = "always-show"; - "sidebar.verticalTabs.dragToPinPromo.dismissed" = true; - "layout.css.devPixelsPerPx" = 1.1; - # Dark - "layout.css.prefers-color-scheme.content-override" = 0; - "browser.toolbars.bookmarks.visibility" = "newtab"; - "browser.startup.page" = 2; - "sidebar.expandOnHover" = false; - "sidebar.animation.enabled" = false; - "privacy.clearOnShutdown_v2.cookiesAndStorage" = false; - "privacy.resistFingerprinting" = false; - "dom.webnotifications.enabled" = false; - }; - }; - policies = { - ExtensionSettings = { - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - private_browsing = true; - }; - "{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/black21/latest.xpi"; - installation_mode = "force_installed"; - }; - "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { - default_area = "menupanel"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; - installation_mode = "force_installed"; - }; - "addon@darkreader.org" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; - installation_mode = "force_installed"; - }; - }; - }; - }; - }; + options.tools.librewolf = { + enable = lib.mkEnableOption "Enables librewolf."; + }; + + config = lib.mkIf config.tools.librewolf.enable { + programs.librewolf = { + enable = true; + package = pkgs.librewolf; + profiles."arpit" = { + isDefault = true; + settings = { + "extensions.autoDisableScopes" = 0; + # Use default dark theme until Black gets installed + "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + "sidebar.verticalTabs" = true; + "sidebar.visibility" = "always-show"; + "sidebar.verticalTabs.dragToPinPromo.dismissed" = true; + "layout.css.devPixelsPerPx" = 1.1; + # Dark + "layout.css.prefers-color-scheme.content-override" = 0; + "browser.toolbars.bookmarks.visibility" = "newtab"; + "browser.startup.page" = 2; + "sidebar.expandOnHover" = false; + "sidebar.animation.enabled" = false; + "privacy.clearOnShutdown_v2.cookiesAndStorage" = false; + "privacy.resistFingerprinting" = false; + "dom.webnotifications.enabled" = false; + }; + }; + policies = { + ExtensionSettings = { + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + private_browsing = true; + }; + "{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/black21/latest.xpi"; + installation_mode = "force_installed"; + }; + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { + default_area = "menupanel"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; + installation_mode = "force_installed"; + }; + "addon@darkreader.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + }; + }; + }; } diff --git a/modules/tools/lsd/default.nix b/modules/tools/lsd/default.nix index da8e81f..ece2cc8 100644 --- a/modules/tools/lsd/default.nix +++ b/modules/tools/lsd/default.nix @@ -1,14 +1,14 @@ { config, lib, ... }: { - options.tools.lsd = { - enable = lib.mkEnableOption "Enables lsd."; - }; - - config = lib.mkIf config.tools.lsd.enable { - programs.lsd = { - enable = true; - settings.icons.separator = " "; - }; - }; + options.tools.lsd = { + enable = lib.mkEnableOption "Enables lsd."; + }; + + config = lib.mkIf config.tools.lsd.enable { + programs.lsd = { + enable = true; + settings.icons.separator = " "; + }; + }; } diff --git a/modules/tools/maim/default.nix b/modules/tools/maim/default.nix index 95c2f5b..e602296 100644 --- a/modules/tools/maim/default.nix +++ b/modules/tools/maim/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.maim = { - enable = lib.mkEnableOption "Enables maim."; - }; - - config = lib.mkIf config.tools.maim.enable { - home.packages = with pkgs; [ - maim - ]; - }; + options.tools.maim = { + enable = lib.mkEnableOption "Enables maim."; + }; + + config = lib.mkIf config.tools.maim.enable { + home.packages = with pkgs; [ + maim + ]; + }; } diff --git a/modules/tools/nixvim/colorscheme.nix b/modules/tools/nixvim/colorscheme.nix index b3dbe4c..acedd55 100644 --- a/modules/tools/nixvim/colorscheme.nix +++ b/modules/tools/nixvim/colorscheme.nix @@ -1,27 +1,27 @@ { config, lib, ... }: { - config = lib.mkIf config.tools.nixvim.enable { - programs.nixvim.colorschemes.base16 = { - enable = true; - colorscheme = with config.scheme.withHashtag; { - base00 = base00; - base01 = base01; - base02 = base02; - base03 = base03; - base04 = base04; - base05 = base05; - base06 = base06; - base07 = base07; - base08 = base08; - base09 = base09; - base0A = base0A; - base0B = base0B; - base0C = base0C; - base0D = base0D; - base0E = base0E; - base0F = base0F; - }; - }; - }; + config = lib.mkIf config.tools.nixvim.enable { + programs.nixvim.colorschemes.base16 = { + enable = true; + colorscheme = with config.scheme.withHashtag; { + base00 = base00; + base01 = base01; + base02 = base02; + base03 = base03; + base04 = base04; + base05 = base05; + base06 = base06; + base07 = base07; + base08 = base08; + base09 = base09; + base0A = base0A; + base0B = base0B; + base0C = base0C; + base0D = base0D; + base0E = base0E; + base0F = base0F; + }; + }; + }; } diff --git a/modules/tools/nixvim/default.nix b/modules/tools/nixvim/default.nix index 932d343..6dd7b85 100644 --- a/modules/tools/nixvim/default.nix +++ b/modules/tools/nixvim/default.nix @@ -1,91 +1,91 @@ { config, lib, ... }: { - imports = [ - ./colorscheme.nix - ./keymaps.nix - ./plugins - ]; - - options.tools.nixvim = { - enable = lib.mkEnableOption "Enables nixvim."; - }; - - config = lib.mkIf config.tools.nixvim.enable - { - programs.nixvim = { - enable = true; - defaultEditor = true; - opts = { - number = true; - relativenumber = true; - shiftwidth = 3; - tabstop = 3; - softtabstop = 3; - expandtab = false; - list = true; - laststatus = 3; - foldlevel = 99; - clipboard = "unnamedplus"; - }; - clipboard.providers.xclip.enable = true; - extraConfigLuaPre = with config.scheme.withHashtag; '' - vim.opt.fillchars:append({ eob = " " }) - vim.opt.listchars = { tab = "| ", trail = "_", lead = "_" } - vim.api.nvim_set_hl(0, "WinSeparator", { - fg = "${base01}", - bg = "${base00}", - }) - vim.api.nvim_set_hl(0, 'NotifyERRORBorder', { fg = '${base08}' }) - vim.api.nvim_set_hl(0, 'NotifyWARNBorder', { fg = '${base09}' }) - vim.api.nvim_set_hl(0, 'NotifyINFOBorder', { fg = '${base0B}' }) - vim.api.nvim_set_hl(0, 'NotifyDEBUGBorder', { fg = '${base03}' }) - vim.api.nvim_set_hl(0, 'NotifyTRACEBorder', { fg = '${base0E}' }) - - vim.api.nvim_set_hl(0, 'NotifyERRORIcon', { fg = '${base08}' }) - vim.api.nvim_set_hl(0, 'NotifyWARNIcon', { fg = '${base09}' }) - vim.api.nvim_set_hl(0, 'NotifyINFOIcon', { fg = '${base0B}' }) - vim.api.nvim_set_hl(0, 'NotifyDEBUGIcon', { fg = '${base03}' }) - vim.api.nvim_set_hl(0, 'NotifyTRACEIcon', { fg = '${base0E}' }) - - vim.api.nvim_set_hl(0, 'NotifyERRORTitle', { fg = '${base08}' }) - vim.api.nvim_set_hl(0, 'NotifyWARNTitle', { fg = '${base09}' }) - vim.api.nvim_set_hl(0, 'NotifyINFOTitle', { fg = '${base0B}' }) - vim.api.nvim_set_hl(0, 'NotifyDEBUGTitle', { fg = '${base03}' }) - vim.api.nvim_set_hl(0, 'NotifyTRACETitle', { fg = '${base0E}' }) - - vim.api.nvim_set_hl(0, 'NotifyERRORBody', { link = 'Normal' }) - vim.api.nvim_set_hl(0, 'NotifyWARNBody', { link = 'Normal' }) - vim.api.nvim_set_hl(0, 'NotifyINFOBody', { link = 'Normal' }) - vim.api.nvim_set_hl(0, 'NotifyDEBUGBody', { link = 'Normal' }) - vim.api.nvim_set_hl(0, 'NotifyTRACEBody', { link = 'Normal' }) - - vim.api.nvim_create_autocmd({ "FileType" }, { - pattern = "*", - callback = function() - vim.opt_local.expandtab = false - vim.opt_local.shiftwidth = 3 - vim.opt_local.softtabstop = 3 - vim.opt_local.tabstop = 3 - end, - }) - - vim.api.nvim_create_autocmd({ "FileType" }, { - pattern = { "yaml", "yml" }, - callback = function() - vim.opt_local.expandtab = true - vim.opt_local.shiftwidth = 2 - vim.opt_local.softtabstop = 2 - vim.opt_local.tabstop = 2 - end, - }) - ''; - performance = { - byteCompileLua.enable = true; - combinePlugins.enable = true; - }; - }; - - home.sessionVariables.EDITOR = "nvim"; - }; + imports = [ + ./colorscheme.nix + ./keymaps.nix + ./plugins + ]; + + options.tools.nixvim = { + enable = lib.mkEnableOption "Enables nixvim."; + }; + + config = lib.mkIf config.tools.nixvim.enable + { + programs.nixvim = { + enable = true; + defaultEditor = true; + opts = { + number = true; + relativenumber = true; + shiftwidth = 3; + tabstop = 3; + softtabstop = 3; + expandtab = false; + list = true; + laststatus = 3; + foldlevel = 99; + clipboard = "unnamedplus"; + }; + clipboard.providers.xclip.enable = true; + extraConfigLuaPre = with config.scheme.withHashtag; '' + vim.opt.fillchars:append({ eob = " " }) + vim.opt.listchars = { tab = " ", trail = "_", lead = " " } + vim.api.nvim_set_hl(0, "WinSeparator", { + fg = "${base01}", + bg = "${base00}", + }) + vim.api.nvim_set_hl(0, 'NotifyERRORBorder', { fg = '${base08}' }) + vim.api.nvim_set_hl(0, 'NotifyWARNBorder', { fg = '${base09}' }) + vim.api.nvim_set_hl(0, 'NotifyINFOBorder', { fg = '${base0B}' }) + vim.api.nvim_set_hl(0, 'NotifyDEBUGBorder', { fg = '${base03}' }) + vim.api.nvim_set_hl(0, 'NotifyTRACEBorder', { fg = '${base0E}' }) + + vim.api.nvim_set_hl(0, 'NotifyERRORIcon', { fg = '${base08}' }) + vim.api.nvim_set_hl(0, 'NotifyWARNIcon', { fg = '${base09}' }) + vim.api.nvim_set_hl(0, 'NotifyINFOIcon', { fg = '${base0B}' }) + vim.api.nvim_set_hl(0, 'NotifyDEBUGIcon', { fg = '${base03}' }) + vim.api.nvim_set_hl(0, 'NotifyTRACEIcon', { fg = '${base0E}' }) + + vim.api.nvim_set_hl(0, 'NotifyERRORTitle', { fg = '${base08}' }) + vim.api.nvim_set_hl(0, 'NotifyWARNTitle', { fg = '${base09}' }) + vim.api.nvim_set_hl(0, 'NotifyINFOTitle', { fg = '${base0B}' }) + vim.api.nvim_set_hl(0, 'NotifyDEBUGTitle', { fg = '${base03}' }) + vim.api.nvim_set_hl(0, 'NotifyTRACETitle', { fg = '${base0E}' }) + + vim.api.nvim_set_hl(0, 'NotifyERRORBody', { link = 'Normal' }) + vim.api.nvim_set_hl(0, 'NotifyWARNBody', { link = 'Normal' }) + vim.api.nvim_set_hl(0, 'NotifyINFOBody', { link = 'Normal' }) + vim.api.nvim_set_hl(0, 'NotifyDEBUGBody', { link = 'Normal' }) + vim.api.nvim_set_hl(0, 'NotifyTRACEBody', { link = 'Normal' }) + + vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = "*", + callback = function() + vim.opt_local.expandtab = false + vim.opt_local.shiftwidth = 3 + vim.opt_local.softtabstop = 3 + vim.opt_local.tabstop = 3 + end, + }) + + vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = { "yaml", "yml" }, + callback = function() + vim.opt_local.expandtab = true + vim.opt_local.shiftwidth = 2 + vim.opt_local.softtabstop = 2 + vim.opt_local.tabstop = 2 + end, + }) + ''; + performance = { + byteCompileLua.enable = true; + combinePlugins.enable = true; + }; + }; + + home.sessionVariables.EDITOR = "nvim"; + }; } diff --git a/modules/tools/nixvim/keymaps.nix b/modules/tools/nixvim/keymaps.nix index 60a2ff4..521363d 100644 --- a/modules/tools/nixvim/keymaps.nix +++ b/modules/tools/nixvim/keymaps.nix @@ -1,18 +1,18 @@ { config, lib, ... }: { - config = lib.mkIf config.tools.nixvim.enable { - programs.nixvim.keymaps = [ - { key = "<c-h>"; action = "<c-w>h"; } - { key = "<c-w>"; action = "<c-w>j"; } - { key = "<c-k>"; action = "<c-w>k"; } - { key = "<c-l>"; action = "<c-w>l"; } - { - key = "<c-n>"; - action = "<cmd>NvimTreeToggle<cr>"; - mode = [ "n" "i" ]; - } - { key = "<c-c>"; action = "<cmd>NotificationsClear<cr>"; } - ]; - }; + config = lib.mkIf config.tools.nixvim.enable { + programs.nixvim.keymaps = [ + { key = "<c-h>"; action = "<c-w>h"; } + { key = "<c-w>"; action = "<c-w>j"; } + { key = "<c-k>"; action = "<c-w>k"; } + { key = "<c-l>"; action = "<c-w>l"; } + { + key = "<c-n>"; + action = "<cmd>NvimTreeToggle<cr>"; + mode = [ "n" "i" ]; + } + { key = "<c-c>"; action = "<cmd>NotificationsClear<cr>"; } + ]; + }; } diff --git a/modules/tools/nixvim/plugins/cmp.nix b/modules/tools/nixvim/plugins/cmp.nix index b02c17e..855a4d5 100644 --- a/modules/tools/nixvim/plugins/cmp.nix +++ b/modules/tools/nixvim/plugins/cmp.nix @@ -1,22 +1,22 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.cmp = lib.mkIf config.tools.nixvim.enable { - enable = true; - autoEnableSources = true; - settings = { - snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - mapping = { - "<C-Space>" = "cmp.mapping.complete()"; - "<CR>" = "cmp.mapping.confirm({ select = true })"; - "<Tab>" = "cmp.mapping.select_next_item()"; - "<S-Tab>" = "cmp.mapping.select_prev_item()"; - }; - sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - ]; - }; - }; + config.programs.nixvim.plugins.cmp = lib.mkIf config.tools.nixvim.enable { + enable = true; + autoEnableSources = true; + settings = { + snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; + mapping = { + "<C-Space>" = "cmp.mapping.complete()"; + "<CR>" = "cmp.mapping.confirm({ select = true })"; + "<Tab>" = "cmp.mapping.select_next_item()"; + "<S-Tab>" = "cmp.mapping.select_prev_item()"; + }; + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; + }; } diff --git a/modules/tools/nixvim/plugins/comment.nix b/modules/tools/nixvim/plugins/comment.nix index ae53f8d..7032997 100644 --- a/modules/tools/nixvim/plugins/comment.nix +++ b/modules/tools/nixvim/plugins/comment.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.comment = lib.mkIf config.tools.nixvim.enable { - enable = true; - }; + config.programs.nixvim.plugins.comment = lib.mkIf config.tools.nixvim.enable { + enable = true; + }; } diff --git a/modules/tools/nixvim/plugins/default.nix b/modules/tools/nixvim/plugins/default.nix index 7599b74..48eaf93 100644 --- a/modules/tools/nixvim/plugins/default.nix +++ b/modules/tools/nixvim/plugins/default.nix @@ -1,17 +1,18 @@ { ... }: { - imports = [ - ./cmp.nix - ./comment.nix - ./lsp.nix - ./lualine.nix - ./luasnip.nix - ./noice.nix - ./notify.nix - ./nvim-tree.nix - ./treesitter.nix - ./web-devicons.nix - ./which-key.nix - ]; + imports = [ + ./cmp.nix + ./comment.nix + ./indent-blankline.nix + ./lsp.nix + ./lualine.nix + ./luasnip.nix + ./noice.nix + ./notify.nix + ./nvim-tree.nix + ./treesitter.nix + ./web-devicons.nix + ./which-key.nix + ]; } diff --git a/modules/tools/nixvim/plugins/indent-blankline.nix b/modules/tools/nixvim/plugins/indent-blankline.nix new file mode 100644 index 0000000..0c99ee2 --- /dev/null +++ b/modules/tools/nixvim/plugins/indent-blankline.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + config.programs.nixvim.plugins.indent-blankline = lib.mkIf config.tools.nixvim.enable { + enable = true; + settings = { + indent = { + char = "┊"; + }; + }; + }; +} diff --git a/modules/tools/nixvim/plugins/lsp.nix b/modules/tools/nixvim/plugins/lsp.nix index f11cf00..f2b7b2b 100644 --- a/modules/tools/nixvim/plugins/lsp.nix +++ b/modules/tools/nixvim/plugins/lsp.nix @@ -1,51 +1,52 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.lsp = lib.mkIf config.tools.nixvim.enable { - enable = true; - keymaps.lspBuf = { - K = "hover"; - gD = "references"; - gd = "definition"; - gi = "implementation"; - gt = "type_definition"; - }; - servers = { - nil_ls = { - enable = true; - }; - lua_ls = { - enable = true; - package = null; - }; - nixd = { - enable = true; - package = null; - }; - pyright = { - enable = true; - package = null; - }; - ts_ls = { - enable = true; - package = null; - }; - clangd = { - enable = true; - package = null; - }; - jsonls = { - enable = true; - package = null; - }; - yamlls = { - enable = true; - package = null; - }; - bash-language-server = { - enable = true; - package = null; - }; - }; - }; + config.programs.nixvim.plugins.lsp = lib.mkIf config.tools.nixvim.enable { + enable = true; + inlayHints = true; + keymaps.lspBuf = { + K = "hover"; + gD = "references"; + gd = "definition"; + gi = "implementation"; + gt = "type_definition"; + }; + servers = { + nil_ls = { + enable = true; + }; + lua_ls = { + enable = true; + package = null; + }; + nixd = { + enable = true; + package = null; + }; + pyright = { + enable = true; + package = null; + }; + ts_ls = { + enable = true; + package = null; + }; + clangd = { + enable = true; + package = null; + }; + jsonls = { + enable = true; + package = null; + }; + yamlls = { + enable = true; + package = null; + }; + bash-language-server = { + enable = true; + package = null; + }; + }; + }; } diff --git a/modules/tools/nixvim/plugins/lualine.nix b/modules/tools/nixvim/plugins/lualine.nix index 8d13399..3138887 100644 --- a/modules/tools/nixvim/plugins/lualine.nix +++ b/modules/tools/nixvim/plugins/lualine.nix @@ -1,39 +1,39 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.lualine = lib.mkIf config.tools.nixvim.enable { - enable = true; - settings = { - options = { - theme = with config.scheme.withHashtag; { - normal = { - a = { fg = base00; bg = base0D; gui = "bold"; }; - b = { fg = base05; bg = base01; }; - c = { fg = base05; bg = base00; }; - }; - insert = { - a = { fg = base00; bg = base0B; gui = "bold"; }; - b = { fg = base05; bg = base01; }; - c = { fg = base05; bg = base00; }; - }; - visual = { - a = { fg = base00; bg = base0A; gui = "bold"; }; - b = { fg = base05; bg = base01; }; - c = { fg = base05; bg = base00; }; - }; - replace = { - a = { fg = base00; bg = base08; gui = "bold"; }; - b = { fg = base05; bg = base01; }; - c = { fg = base05; bg = base00; }; - }; - inactive = { - a = { fg = base04; bg = base00; gui = "bold"; }; - b = { fg = base04; bg = base00; }; - c = { fg = base04; bg = base00; }; - }; - }; - icons_enabled = true; - }; - }; - }; + config.programs.nixvim.plugins.lualine = lib.mkIf config.tools.nixvim.enable { + enable = true; + settings = { + options = { + theme = with config.scheme.withHashtag; { + normal = { + a = { fg = base00; bg = base0D; gui = "bold"; }; + b = { fg = base05; bg = base01; }; + c = { fg = base05; bg = base00; }; + }; + insert = { + a = { fg = base00; bg = base0B; gui = "bold"; }; + b = { fg = base05; bg = base01; }; + c = { fg = base05; bg = base00; }; + }; + visual = { + a = { fg = base00; bg = base0A; gui = "bold"; }; + b = { fg = base05; bg = base01; }; + c = { fg = base05; bg = base00; }; + }; + replace = { + a = { fg = base00; bg = base08; gui = "bold"; }; + b = { fg = base05; bg = base01; }; + c = { fg = base05; bg = base00; }; + }; + inactive = { + a = { fg = base04; bg = base00; gui = "bold"; }; + b = { fg = base04; bg = base00; }; + c = { fg = base04; bg = base00; }; + }; + }; + icons_enabled = true; + }; + }; + }; } diff --git a/modules/tools/nixvim/plugins/luasnip.nix b/modules/tools/nixvim/plugins/luasnip.nix index 80483a7..dfa0618 100644 --- a/modules/tools/nixvim/plugins/luasnip.nix +++ b/modules/tools/nixvim/plugins/luasnip.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.luasnip = lib.mkIf config.tools.nixvim.enable { - enable = true; - }; + config.programs.nixvim.plugins.luasnip = lib.mkIf config.tools.nixvim.enable { + enable = true; + }; } diff --git a/modules/tools/nixvim/plugins/noice.nix b/modules/tools/nixvim/plugins/noice.nix index a149ee8..313df4b 100644 --- a/modules/tools/nixvim/plugins/noice.nix +++ b/modules/tools/nixvim/plugins/noice.nix @@ -1,18 +1,18 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.noice = lib.mkIf config.tools.nixvim.enable { - enable = true; - cmdline = { - enabled = true; - view = "cmdline_popup"; - }; - popupmenu = { - enabled = true; - backend = "cmp"; - }; - presets = { - command_palette = true; - }; - }; + config.programs.nixvim.plugins.noice = lib.mkIf config.tools.nixvim.enable { + enable = true; + cmdline = { + enabled = true; + view = "cmdline_popup"; + }; + popupmenu = { + enabled = true; + backend = "cmp"; + }; + presets = { + command_palette = true; + }; + }; } diff --git a/modules/tools/nixvim/plugins/notify.nix b/modules/tools/nixvim/plugins/notify.nix index 09ac9cb..7f77536 100644 --- a/modules/tools/nixvim/plugins/notify.nix +++ b/modules/tools/nixvim/plugins/notify.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.notify = lib.mkIf config.tools.nixvim.enable { - enable = false; - }; + config.programs.nixvim.plugins.notify = lib.mkIf config.tools.nixvim.enable { + enable = false; + }; } diff --git a/modules/tools/nixvim/plugins/nvim-tree.nix b/modules/tools/nixvim/plugins/nvim-tree.nix index 9e2e55e..813bd30 100644 --- a/modules/tools/nixvim/plugins/nvim-tree.nix +++ b/modules/tools/nixvim/plugins/nvim-tree.nix @@ -1,45 +1,45 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.nvim-tree = lib.mkIf config.tools.nixvim.enable { - enable = true; - settings = { - filters = { - dotfiles = false; - git_clean = false; - no_buffer = false; - custom = {}; - }; - git = { - enable = true; - ignore = false; - }; - view = { - width = { - padding = 0; - }; - }; - renderer = { - indent_markers = { - enable = true; - inline_arrows = false; - icons = { - corner = "└"; - edge = "│"; - item = "├"; - bottom = "─"; - none = " "; - }; - }; - icons = { - show = { - folder = true; - folder_arrow = false; - file = true; - git = true; - }; - }; - }; - }; - }; + config.programs.nixvim.plugins.nvim-tree = lib.mkIf config.tools.nixvim.enable { + enable = true; + settings = { + filters = { + dotfiles = false; + git_clean = false; + no_buffer = false; + custom = {}; + }; + git = { + enable = true; + ignore = false; + }; + view = { + width = { + padding = 0; + }; + }; + renderer = { + indent_markers = { + enable = true; + inline_arrows = false; + icons = { + corner = "└"; + edge = "│"; + item = "├"; + bottom = "─"; + none = " "; + }; + }; + icons = { + show = { + folder = true; + folder_arrow = false; + file = true; + git = true; + }; + }; + }; + }; + }; } diff --git a/modules/tools/nixvim/plugins/treesitter.nix b/modules/tools/nixvim/plugins/treesitter.nix index f13c84e..7100ba1 100644 --- a/modules/tools/nixvim/plugins/treesitter.nix +++ b/modules/tools/nixvim/plugins/treesitter.nix @@ -1,14 +1,14 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.treesitter = lib.mkIf config.tools.nixvim.enable { - enable = true; - folding = { - enable = true; - }; - settings = { - highlight = { enable = true; }; - indent = { enable = true; }; - }; - }; + config.programs.nixvim.plugins.treesitter = lib.mkIf config.tools.nixvim.enable { + enable = true; + folding = { + enable = true; + }; + settings = { + highlight = { enable = true; }; + indent = { enable = true; }; + }; + }; } diff --git a/modules/tools/nixvim/plugins/web-devicons.nix b/modules/tools/nixvim/plugins/web-devicons.nix index 6cbfcd0..4d70fcb 100644 --- a/modules/tools/nixvim/plugins/web-devicons.nix +++ b/modules/tools/nixvim/plugins/web-devicons.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.web-devicons = lib.mkIf config.tools.nixvim.enable { - enable = true; - }; + config.programs.nixvim.plugins.web-devicons = lib.mkIf config.tools.nixvim.enable { + enable = true; + }; } diff --git a/modules/tools/nixvim/plugins/which-key.nix b/modules/tools/nixvim/plugins/which-key.nix index 99f4393..e5b96a5 100644 --- a/modules/tools/nixvim/plugins/which-key.nix +++ b/modules/tools/nixvim/plugins/which-key.nix @@ -1,15 +1,15 @@ { config, lib, ... }: { - config.programs.nixvim.plugins.which-key = lib.mkIf config.tools.nixvim.enable { - enable = true; - settings = { - plugins = { - marks = true; - registers = true; - spelling = { enabled = true; suggestions = 20; }; - }; - win = { border = "single"; }; - }; - }; + config.programs.nixvim.plugins.which-key = lib.mkIf config.tools.nixvim.enable { + enable = true; + settings = { + plugins = { + marks = true; + registers = true; + spelling = { enabled = true; suggestions = 20; }; + }; + win = { border = "single"; }; + }; + }; } diff --git a/modules/tools/nnn/default.nix b/modules/tools/nnn/default.nix index 7a9f30f..aaab53d 100644 --- a/modules/tools/nnn/default.nix +++ b/modules/tools/nnn/default.nix @@ -1,32 +1,32 @@ { config, pkgs, lib, ... }: { - options.tools.nnn = { - enable = lib.mkEnableOption "Enables nnn."; - }; - - config = lib.mkIf config.tools.nnn.enable { - home.sessionVariables = { - # Start nnn in detail mode + show hidden items by default - NNN_OPTS = "dH"; - NNN_FIFO = "/tmp/nnn.fifo"; - }; - - programs.nnn = { - enable = true; - package = pkgs.nnn.override ({ withNerdIcons = true; }); - plugins = { - src = "${config.programs.nnn.package}/share/plugins"; - mappings = { - p = "preview-tui"; - }; - }; - extraPackages = with pkgs; [ - bat - ffmpeg - ffmpegthumbnailer - ueberzugpp - ]; - }; - }; + options.tools.nnn = { + enable = lib.mkEnableOption "Enables nnn."; + }; + + config = lib.mkIf config.tools.nnn.enable { + home.sessionVariables = { + # Start nnn in detail mode + show hidden items by default + NNN_OPTS = "dH"; + NNN_FIFO = "/tmp/nnn.fifo"; + }; + + programs.nnn = { + enable = true; + package = pkgs.nnn.override ({ withNerdIcons = true; }); + plugins = { + src = "${config.programs.nnn.package}/share/plugins"; + mappings = { + p = "preview-tui"; + }; + }; + extraPackages = with pkgs; [ + bat + ffmpeg + ffmpegthumbnailer + ueberzugpp + ]; + }; + }; } diff --git a/modules/tools/nvtop/default.nix b/modules/tools/nvtop/default.nix index d21b952..10103e6 100644 --- a/modules/tools/nvtop/default.nix +++ b/modules/tools/nvtop/default.nix @@ -1,13 +1,13 @@ { config, pkgs, lib, ... }: { - options.tools.nvtop = { - enable = lib.mkEnableOption "Enables nvtop."; - }; - - config = lib.mkIf config.tools.nvtop.enable { - home.packages = with pkgs; [ - nvtopPackages.full - ]; - }; + options.tools.nvtop = { + enable = lib.mkEnableOption "Enables nvtop."; + }; + + config = lib.mkIf config.tools.nvtop.enable { + home.packages = with pkgs; [ + nvtopPackages.full + ]; + }; } diff --git a/modules/tools/pamixer/default.nix b/modules/tools/pamixer/default.nix index 1ae7679..0a34131 100644 --- a/modules/tools/pamixer/default.nix +++ b/modules/tools/pamixer/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.pamixer = { - enable = lib.mkEnableOption "Enables pamixer."; - }; - - config = lib.mkIf config.tools.pamixer.enable { - home.packages = with pkgs; [ - pamixer - ]; - }; + options.tools.pamixer = { + enable = lib.mkEnableOption "Enables pamixer."; + }; + + config = lib.mkIf config.tools.pamixer.enable { + home.packages = with pkgs; [ + pamixer + ]; + }; } diff --git a/modules/tools/playerctl/default.nix b/modules/tools/playerctl/default.nix index faf5d1c..16ce781 100644 --- a/modules/tools/playerctl/default.nix +++ b/modules/tools/playerctl/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.playerctl = { - enable = lib.mkEnableOption "Enables playerctl."; - }; - - config = lib.mkIf config.tools.playerctl.enable { - home.packages = with pkgs; [ - playerctl - ]; - }; + options.tools.playerctl = { + enable = lib.mkEnableOption "Enables playerctl."; + }; + + config = lib.mkIf config.tools.playerctl.enable { + home.packages = with pkgs; [ + playerctl + ]; + }; } diff --git a/modules/tools/rofi/default.nix b/modules/tools/rofi/default.nix index ef4e87b..f8c2e02 100644 --- a/modules/tools/rofi/default.nix +++ b/modules/tools/rofi/default.nix @@ -1,75 +1,75 @@ { lib, config, ... }: { - options.tools.rofi = { - enable = lib.mkEnableOption "Enables rofi."; - }; - - config = lib.mkIf config.tools.rofi.enable { - programs.rofi = { - enable = true; - font = "${config.fonts.normal} ${toString config.fonts.size}"; - theme = with config.scheme.withHashtag; let - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - border = 1; - margin = 0; - padding = 0; - spacing = 0; - - bg = mkLiteral base00; - bg-alt = mkLiteral base01; - fg = mkLiteral base07; - fg-alt = mkLiteral base03; - background-color = mkLiteral "@bg"; - text-color = mkLiteral "@fg"; - }; - - window = { - border-color = mkLiteral base03; - }; - - mainbox = { - children = map mkLiteral [ "inputbar" "listview" ]; - }; - - inputbar = { - background-color = mkLiteral "@bg-alt"; - children = map mkLiteral [ "prompt" "entry" ]; - }; - - entry = { - background-color = mkLiteral "inherit"; - padding = mkLiteral "12px 3px"; - }; - - prompt = { - background-color = mkLiteral "inherit"; - padding = mkLiteral "12px"; - }; - - listview = { - lines = 8; - }; - - element = { - children = map mkLiteral [ "element-text" ]; - }; - - element-icon = { - padding = mkLiteral "10px 10px"; - }; - - element-text = { - padding = mkLiteral "10px 10px"; - text-color = mkLiteral "@fg-alt"; - }; - - "element-text selected" = { - text-color = mkLiteral "@fg"; - }; - }; - }; - }; + options.tools.rofi = { + enable = lib.mkEnableOption "Enables rofi."; + }; + + config = lib.mkIf config.tools.rofi.enable { + programs.rofi = { + enable = true; + font = "${config.fonts.normal} ${toString config.fonts.size}"; + theme = with config.scheme.withHashtag; let + inherit (config.lib.formats.rasi) mkLiteral; + in { + "*" = { + border = 1; + margin = 0; + padding = 0; + spacing = 0; + + bg = mkLiteral base00; + bg-alt = mkLiteral base01; + fg = mkLiteral base07; + fg-alt = mkLiteral base03; + background-color = mkLiteral "@bg"; + text-color = mkLiteral "@fg"; + }; + + window = { + border-color = mkLiteral base03; + }; + + mainbox = { + children = map mkLiteral [ "inputbar" "listview" ]; + }; + + inputbar = { + background-color = mkLiteral "@bg-alt"; + children = map mkLiteral [ "prompt" "entry" ]; + }; + + entry = { + background-color = mkLiteral "inherit"; + padding = mkLiteral "12px 3px"; + }; + + prompt = { + background-color = mkLiteral "inherit"; + padding = mkLiteral "12px"; + }; + + listview = { + lines = 8; + }; + + element = { + children = map mkLiteral [ "element-text" ]; + }; + + element-icon = { + padding = mkLiteral "10px 10px"; + }; + + element-text = { + padding = mkLiteral "10px 10px"; + text-color = mkLiteral "@fg-alt"; + }; + + "element-text selected" = { + text-color = mkLiteral "@fg"; + }; + }; + }; + }; } diff --git a/modules/tools/starship/default.nix b/modules/tools/starship/default.nix index 02e845e..d3ed86c 100644 --- a/modules/tools/starship/default.nix +++ b/modules/tools/starship/default.nix @@ -1,69 +1,66 @@ { config, lib, ... }: { - options.tools.starship = { - enable = lib.mkEnableOption "Enables starship."; - }; - - config = lib.mkIf config.tools.starship.enable { - programs.starship = { - enable = true; - enableZshIntegration = config.tools.zsh.enable; - settings = - let - mkSegment = content: ''[┄\[](red)[${content}]($style)[\]](red)''; - in { - add_newline = true; - - format = '' -[╭─\[](red)$hostname[@](red)$username[\]](red)$directory$git_branch$git_status$nix_shell -[╰─](red)$status$character -''; - - character.format = "[](red)"; - - username = { - style_user = "blue"; - style_root = "red bold"; - format = "[$user]($style)"; - show_always = true; - }; - - hostname = { - ssh_only = false; - style = "green"; - format = "[$hostname]($style)"; - }; - - directory = { - style = "purple"; - truncate_to_repo = false; - format = mkSegment "$path"; - }; - - git_branch = { - style = "bold yellow"; - format = ''[┄\[](red)[$symbol$branch(:$remote_branch)]($style)''; - }; - - git_status = { - style = "cyan"; - format = ''( [$all_status$ahead_behind]($style))[\]](red)''; - }; - - nix_shell = { - format = mkSegment "$symbol $state( \($name\))"; - symbol = ""; - impure_msg = ""; - pure_msg = ""; - }; - - status = { - disabled = false; - format = ''${mkSegment "$symbol $status"}[┄─](red)''; - style = "white"; - }; - }; - }; - }; + options.tools.starship = { + enable = lib.mkEnableOption "Enables starship."; + }; + + config = lib.mkIf config.tools.starship.enable { + programs.starship = { + enable = true; + enableZshIntegration = config.tools.zsh.enable; + settings = + let + mkSegment = content: ''[┄\[](red)[${content}]($style)[\]](red)''; + in { + add_newline = true; + + format = ''''\n[╭─\[](red)$hostname[@](red)$username[\]](red)$directory$git_branch$git_status$nix_shell''\n[╰─](red)$status$character ''\n''; + + character.format = "[](red)"; + + username = { + style_user = "blue"; + style_root = "red bold"; + format = "[$user]($style)"; + show_always = true; + }; + + hostname = { + ssh_only = false; + style = "green"; + format = "[$hostname]($style)"; + }; + + directory = { + style = "purple"; + truncate_to_repo = false; + format = mkSegment "$path"; + }; + + git_branch = { + style = "bold yellow"; + format = ''[┄\[](red)[$symbol$branch(:$remote_branch)]($style)''; + }; + + git_status = { + style = "cyan"; + format = ''( [$all_status$ahead_behind]($style))[\]](red)''; + }; + + nix_shell = { + format = mkSegment "$symbol $state( \($name\))"; + symbol = ""; + impure_msg = ""; + pure_msg = ""; + }; + + status = { + disabled = false; + format = ''${mkSegment "$symbol $status"}[┄─](red)''; + style = "white"; + }; + }; + }; + }; } diff --git a/modules/tools/steam/default.nix b/modules/tools/steam/default.nix index bd23fde..ca265b5 100644 --- a/modules/tools/steam/default.nix +++ b/modules/tools/steam/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.steam = { - enable = lib.mkEnableOption "Enables steam."; - }; - - config = lib.mkIf config.tools.steam.enable { - home.packages = with pkgs; [ - steam - ]; - }; + options.tools.steam = { + enable = lib.mkEnableOption "Enables steam."; + }; + + config = lib.mkIf config.tools.steam.enable { + home.packages = with pkgs; [ + steam + ]; + }; } diff --git a/modules/tools/systemctl-tui/default.nix b/modules/tools/systemctl-tui/default.nix index 0c6916f..6c9a706 100644 --- a/modules/tools/systemctl-tui/default.nix +++ b/modules/tools/systemctl-tui/default.nix @@ -1,13 +1,13 @@ { config, pkgs, lib, ... }: { - options.tools.systemctl-tui = { - enable = lib.mkEnableOption "Enables systemctl-tui."; - }; - - config = lib.mkIf config.tools.systemctl-tui.enable { - home.packages = with pkgs; [ - systemctl-tui - ]; - }; + options.tools.systemctl-tui = { + enable = lib.mkEnableOption "Enables systemctl-tui."; + }; + + config = lib.mkIf config.tools.systemctl-tui.enable { + home.packages = with pkgs; [ + systemctl-tui + ]; + }; } diff --git a/modules/tools/tmux/default.nix b/modules/tools/tmux/default.nix index f99cb40..d9b8fc4 100644 --- a/modules/tools/tmux/default.nix +++ b/modules/tools/tmux/default.nix @@ -1,11 +1,11 @@ { config, lib, ... }: { - options.tools.tmux = { - enable = lib.mkEnableOption "Enables tmux."; - }; - - config = lib.mkIf config.tools.tmux.enable { - programs.tmux.enable = true; - }; + options.tools.tmux = { + enable = lib.mkEnableOption "Enables tmux."; + }; + + config = lib.mkIf config.tools.tmux.enable { + programs.tmux.enable = true; + }; } diff --git a/modules/tools/tor-browser/default.nix b/modules/tools/tor-browser/default.nix index 7986ff4..f69fa27 100644 --- a/modules/tools/tor-browser/default.nix +++ b/modules/tools/tor-browser/default.nix @@ -1,13 +1,13 @@ { pkgs, lib, config, ... }: { - options.tools.tor-browser = { - enable = lib.mkEnableOption "Enables tor-browser."; - }; - - config = lib.mkIf config.tools.tor-browser.enable { - home.packages = with pkgs; [ - tor-browser - ]; - }; + options.tools.tor-browser = { + enable = lib.mkEnableOption "Enables tor-browser."; + }; + + config = lib.mkIf config.tools.tor-browser.enable { + home.packages = with pkgs; [ + tor-browser + ]; + }; } diff --git a/modules/tools/unar/default.nix b/modules/tools/unar/default.nix index 956c3cd..e289fb0 100644 --- a/modules/tools/unar/default.nix +++ b/modules/tools/unar/default.nix @@ -1,13 +1,13 @@ { pkgs, lib, config, ... }: { - options.tools.unar = { - enable = lib.mkEnableOption "Enables unar."; - }; - - config = lib.mkIf config.tools.unar.enable { - home.packages = with pkgs; [ - unar - ]; - }; + options.tools.unar = { + enable = lib.mkEnableOption "Enables unar."; + }; + + config = lib.mkIf config.tools.unar.enable { + home.packages = with pkgs; [ + unar + ]; + }; } diff --git a/modules/tools/vlc/default.nix b/modules/tools/vlc/default.nix index 8e71593..515f181 100644 --- a/modules/tools/vlc/default.nix +++ b/modules/tools/vlc/default.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: { - options.tools.vlc = { - enable = lib.mkEnableOption "Enables vlc."; - }; - - config = lib.mkIf config.tools.vlc.enable { - home.packages = with pkgs; [ - vlc - ]; - }; + options.tools.vlc = { + enable = lib.mkEnableOption "Enables vlc."; + }; + + config = lib.mkIf config.tools.vlc.enable { + home.packages = with pkgs; [ + vlc + ]; + }; } diff --git a/modules/tools/vscode/default.nix b/modules/tools/vscode/default.nix index 7aab6f7..b196054 100644 --- a/modules/tools/vscode/default.nix +++ b/modules/tools/vscode/default.nix @@ -1,14 +1,14 @@ { config, lib, pkgs, ... }: { - options.tools.vscode = { - enable = lib.mkEnableOption "Enables vscode."; - }; - - config = lib.mkIf config.tools.vscode.enable { - programs.vscode = { - enable = true; - package = pkgs.vscodium; - }; - }; + options.tools.vscode = { + enable = lib.mkEnableOption "Enables vscode."; + }; + + config = lib.mkIf config.tools.vscode.enable { + programs.vscode = { + enable = true; + package = pkgs.vscodium; + }; + }; } diff --git a/modules/tools/zathura/default.nix b/modules/tools/zathura/default.nix index 9d7c48a..0b63957 100644 --- a/modules/tools/zathura/default.nix +++ b/modules/tools/zathura/default.nix @@ -1,11 +1,11 @@ { config, lib, ... }: { - options.tools.zathura = { - enable = lib.mkEnableOption "Enables zathura."; - }; - - config = lib.mkIf config.tools.zathura.enable { - programs.zathura.enable = true; - }; + options.tools.zathura = { + enable = lib.mkEnableOption "Enables zathura."; + }; + + config = lib.mkIf config.tools.zathura.enable { + programs.zathura.enable = true; + }; } diff --git a/modules/tools/zsh/default.nix b/modules/tools/zsh/default.nix index 882653b..0fed380 100644 --- a/modules/tools/zsh/default.nix +++ b/modules/tools/zsh/default.nix @@ -1,25 +1,25 @@ { config, lib, ... }: { - options.tools.zsh = { - enable = lib.mkEnableOption "Enables zsh."; - }; - - config = lib.mkIf config.tools.zsh.enable { - programs.zsh = { - enable = true; - dotDir = "${config.xdg.configHome}/zsh"; - history.path = "${config.xdg.cacheHome}/zsh/history"; - initContent = '' -setopt PROMPT_SUBST + options.tools.zsh = { + enable = lib.mkEnableOption "Enables zsh."; + }; + + config = lib.mkIf config.tools.zsh.enable { + programs.zsh = { + enable = true; + dotDir = "${config.xdg.configHome}/zsh"; + history.path = "${config.xdg.cacheHome}/zsh/history"; + initContent = '' + setopt PROMPT_SUBST -autoload -U colors && colors + autoload -U colors && colors -bindkey "^[[3~" delete-char -bindkey "^?" backward-delete-char - ''; - }; - - home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh"; - }; + bindkey "^[[3~" delete-char + bindkey "^?" backward-delete-char + ''; + }; + + home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh"; + }; } |
