diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-07-10 01:29:48 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-07-10 01:29:48 +0530 |
| commit | 085ff668ab45ac8d57c093e502b1175a86f2c14e (patch) | |
| tree | 0fe7de3fdb29a9d0f7294e4af91d938fe5283533 | |
| parent | 70b590bf6b83dcb8f142451951a0f54ec3308283 (diff) | |
| download | home-manager-config-085ff668ab45ac8d57c093e502b1175a86f2c14e.tar.gz home-manager-config-085ff668ab45ac8d57c093e502b1175a86f2c14e.zip | |
Removed unnecessary packages.
82 files changed, 92 insertions, 1594 deletions
@@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1732200724, - "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "153d52373b0fb2d343592871009a286ec8837aec", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", "type": "github" }, "original": { @@ -41,31 +41,32 @@ ] }, "locked": { - "lastModified": 1734344598, - "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", + "lastModified": 1751810233, + "narHash": "sha256-kllkNbIqQi3VplgTMeGzuh1t8Gk8TauvkTRt93Km+tQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "83ecd50915a09dca928971139d3a102377a8d242", + "rev": "9b0873b46c9f9e4b7aa01eb634952c206af53068", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1734119587, - "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "lastModified": 1751943650, + "narHash": "sha256-7orTnNqkGGru8Je6Un6mq1T8YVVU/O5kyW4+f9C1mZQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "rev": "88983d4b665fb491861005137ce2b11a9f89f203", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -81,11 +82,11 @@ "tt-schemes": { "flake": false, "locked": { - "lastModified": 1733769397, - "narHash": "sha256-PXah6e8PK41T9vONsh9X4AVSO0Nq6OtwN4Hd22GizVo=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "d5024d07713029d21aa45263e164913a0dfab0b6", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -2,9 +2,9 @@ description = "Home Manager configuration of arpit."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; base16.url = "github:SenchoPens/base16.nix"; @@ -3,52 +3,28 @@ { home.username = "arpit"; home.homeDirectory = "/home/${config.home.username}"; - home.stateVersion = "24.11"; - - baseDirectory = "${config.home.homeDirectory}/home-manager"; - - # Desktop - desktop.display-server.x11.xclip.enable = true; - desktop.display-server.x11.xinit.enable = true; - desktop.application-launcher.rofi.enable = false; - desktop.application-launcher.fzf.enable = true; - desktop.application-launcher.default = "fzf"; - desktop.display-server.compositor.picom.enable = false; - desktop.status-bar.polybar.enable = true; - desktop.window-manager.bspwm.enable = true; - desktop.window-manager.sxhkd.enable = true; - desktop.window-manager.i3.enable = false; - desktop.window-manager.default = "bspwm"; - desktop.xdg.portal.enable = false; + home.stateVersion = "25.05"; # Fonts fonts.nerdfont.fira-code.enable = true; + # Enable scripts scripts.enable = true; - # Shell - shell.bash.enable = true; - shell.zsh.enable = true; - shell.default = "zsh"; - # Tools - tools.editor.neovim.enable = true; - tools.editor.neovim.profile = "full"; - tools.file-manager.lf.enable = false; - tools.file-manager.nnn.enable = true; - tools.file-manager.default = "nnn"; - tools.file-manager.lsd.enable = true; + tools.bat.enable = true; + tools.feh.enable = true; + tools.fzf.enable = true; tools.git.enable = true; tools.git.username = "Arpit Chakladar"; tools.git.email = "54011232+arpitchakladar@users.noreply.github.com"; - tools.system-monitor.htop.enable = true; - tools.terminal.alacritty.enable = false; - tools.terminal.kitty.enable = true; - tools.terminal.tmux.enable = true; - tools.terminal.default = "kitty"; - tools.utils.fzf.enable = true; - tools.viewer.bat.enable = true; - tools.viewer.feh.enable = true; + tools.htop.enable = true; + tools.kitty.enable = true; + tools.lsd.enable = true; + tools.neovim.enable = true; + tools.neovim.profile = "full"; + tools.nnn.enable = true; + tools.zsh.enable = true; programs.home-manager.enable = true; } diff --git a/modules/default.nix b/modules/default.nix index 5e01083..13ba2b9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,18 +1,9 @@ -{ lib, ... }: +{ ... }: { imports = [ - ./desktop ./fonts ./scripts - ./shell ./tools ]; - - options = { - baseDirectory = lib.mkOption { - type = lib.types.str; - description = "Path to the base of the current home manager configuration."; - }; - }; } diff --git a/modules/desktop/application-launcher/default.nix b/modules/desktop/application-launcher/default.nix deleted file mode 100644 index 012deb5..0000000 --- a/modules/desktop/application-launcher/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./fzf - ./rofi - ]; - - options.desktop.application-launcher = { - default = lib.mkOption { - type = lib.types.enum [ - "fzf" - "rofi" - ]; - description = "Select the default application launcher."; - }; - - command = lib.mkOption { - type = lib.types.str; - description = "Command for default application launcher program."; - }; - }; -} diff --git a/modules/desktop/application-launcher/fzf/default.nix b/modules/desktop/application-launcher/fzf/default.nix deleted file mode 100644 index a7d12d3..0000000 --- a/modules/desktop/application-launcher/fzf/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.desktop.application-launcher.fzf = { - enable = lib.mkEnableOption "Enables fzf to be used as a application launcher."; - }; - - config = lib.mkIf config.desktop.application-launcher.fzf.enable { - assertions = [ - { - assertion = config.tools.utils.fzf.enable; - message ="Module desktop.application-launcher.fzf requires tools.utils.fzf module to be enabled."; - } - ]; - - desktop.application-launcher.default = lib.mkDefault "fzf"; - desktop.application-launcher.command = - lib.mkIf - (config.desktop.application-launcher.default == "fzf") - "${config.tools.terminal.command} --title 'Application Launcher' --class floating-termial -e ${(pkgs.writeShellScript "fzf-launch.sh" (builtins.readFile ./launch.sh))}"; - }; -} diff --git a/modules/desktop/application-launcher/fzf/launch.sh b/modules/desktop/application-launcher/fzf/launch.sh deleted file mode 100644 index 53987f6..0000000 --- a/modules/desktop/application-launcher/fzf/launch.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Function to get executables from PATH and display them with Nerd Font icons -get_executables() { - for dir in $(echo "$PATH" | tr ':' ' '); do - [ -d "$dir" ] && ls "$dir" 2>/dev/null | awk -F/ '{print "\033[31m \033[0m " $NF}' - done | sort -u -} - -# Function to run fzf and select an executable -select_executable() { - fzf --ansi --height=100% --border=none --layout=reverse --no-multi --prompt " " -} - -# Function to remove ANSI codes and icons from the selected executable -clean_selection() { - sed 's/\x1B\[[0-9;]*m//g' | awk '{$1=""; print $0}' | sed 's/^ //' -} - -# Main script execution -selected_executable=$(get_executables | select_executable | clean_selection) - -# If an executable is selected, run it -if [ -n "$selected_executable" ]; then - setsid "$selected_executable" >/dev/null 2>&1 & - sleep 0.01 - kill -9 $PPID -fi diff --git a/modules/desktop/application-launcher/rofi/default.nix b/modules/desktop/application-launcher/rofi/default.nix deleted file mode 100644 index bfdd617..0000000 --- a/modules/desktop/application-launcher/rofi/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.desktop.application-launcher.rofi = { - enable = lib.mkEnableOption "Enables rofi."; - }; - - config = lib.mkIf config.desktop.application-launcher.rofi.enable { - desktop.application-launcher.default = lib.mkDefault "rofi"; - desktop.application-launcher.command = - lib.mkIf - (config.desktop.application-launcher.default == "rofi") - "${pkgs.rofi}/bin/rofi -show run"; - - programs.rofi.enable = true; - programs.rofi.font = "${config.fonts.normal} ${toString config.fonts.size}"; - programs.rofi.theme = config.scheme { - template = builtins.readFile ./theme.mustache.rasi; - }; - }; -} diff --git a/modules/desktop/application-launcher/rofi/theme.mustache.rasi b/modules/desktop/application-launcher/rofi/theme.mustache.rasi deleted file mode 100644 index 02cdaf3..0000000 --- a/modules/desktop/application-launcher/rofi/theme.mustache.rasi +++ /dev/null @@ -1,82 +0,0 @@ -configuration { - drun { - display-name: " "; - } - - run { - display-name: " "; - } - - window { - display-name: " "; - } - - ssh { - display-name: " "; - } - - timeout { - delay: 10; - action: "kb-cancel"; - } -} - -* { - border: 1; - margin: 0; - padding: 0; - spacing: 0; - - bg: #{{base00-hex}}; - bg-alt: #{{base01-hex}}; - fg: #{{base07-hex}}; - fg-alt: #{{base03-hex}}; - - background-color: @bg; - text-color: @fg; -} - -window { - transparency: "real"; - border-color: #{{base03-hex}}; -} - -mainbox { - children: [inputbar, listview]; -} - -inputbar { - background-color: @bg-alt; - children: [prompt, entry]; -} - -entry { - background-color: inherit; - padding: 12px 3px; -} - -prompt { - background-color: inherit; - padding: 12px; -} - -listview { - lines: 8; -} - -element { - children: [element-text]; -} - -element-icon { - padding: 10px 10px; -} - -element-text { - padding: 10px 10px; - text-color: @fg-alt; -} - -element-text selected { - text-color: @fg; -} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix deleted file mode 100644 index edb8959..0000000 --- a/modules/desktop/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: - -{ - imports = [ - ./application-launcher - ./display-server - ./status-bar - ./window-manager - ./xdg - ]; -} diff --git a/modules/desktop/display-server/compositor/default.nix b/modules/desktop/display-server/compositor/default.nix deleted file mode 100644 index ae5fc6d..0000000 --- a/modules/desktop/display-server/compositor/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./picom - ]; -} diff --git a/modules/desktop/display-server/compositor/picom/default.nix b/modules/desktop/display-server/compositor/picom/default.nix deleted file mode 100644 index 750fd1e..0000000 --- a/modules/desktop/display-server/compositor/picom/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, config, ... }: - -{ - options.desktop.display-server.compositor.picom = { - enable = lib.mkEnableOption "Enables picom."; - }; - - config = lib.mkIf config.desktop.display-server.compositor.picom.enable { - services.picom.enable = true; - services.picom.backend = "xrender"; - services.picom.fade = false; - services.picom.shadow = false; - services.picom.settings = { - blur-background = false; - background = "#000000"; - transparent-clipping = true; - }; - services.picom.activeOpacity = 0.8; - services.picom.inactiveOpacity = 0.8; - services.picom.opacityRules = [ - "100:class_g = 'Polybar'" # 70% opacity for Polybar - ]; - }; -} diff --git a/modules/desktop/display-server/default.nix b/modules/desktop/display-server/default.nix deleted file mode 100644 index 5062f7c..0000000 --- a/modules/desktop/display-server/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - imports = [ - ./compositor - ./x11 - ]; -} diff --git a/modules/desktop/display-server/x11/default.nix b/modules/desktop/display-server/x11/default.nix deleted file mode 100644 index f1fd52a..0000000 --- a/modules/desktop/display-server/x11/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - imports = [ - ./xclip - ./xinit - ]; -} diff --git a/modules/desktop/display-server/x11/xclip/default.nix b/modules/desktop/display-server/x11/xclip/default.nix deleted file mode 100644 index 7c97d60..0000000 --- a/modules/desktop/display-server/x11/xclip/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, config, pkgs, ... }: - -{ - options.desktop.display-server.x11.xclip = { - enable = lib.mkEnableOption "Enables xclip."; - }; - - config = lib.mkIf config.desktop.display-server.x11.xclip.enable { - home.packages = with pkgs; [ - xclip - ]; - }; -} diff --git a/modules/desktop/display-server/x11/xinit/default.nix b/modules/desktop/display-server/x11/xinit/default.nix deleted file mode 100644 index 6e82e2c..0000000 --- a/modules/desktop/display-server/x11/xinit/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, config, pkgs, ... }: - -{ - options.desktop.display-server.x11.xinit = { - enable = lib.mkEnableOption "Enables xinit."; - }; - - config = lib.mkIf config.desktop.display-server.x11.xinit.enable { - home.file.".xinitrc" = { - executable = true; - - source = pkgs.writeText ".xinitrc" -'' -#!/bin/sh -${if config.tools.viewer.feh.enable then - "feh --bg-scale ${../../../../../assets/skeleton-mage.png}" -else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""} -${if config.desktop.status-bar.polybar.enable then - config.desktop.status-bar.polybar.command -else ""} -${if config.desktop.window-manager.sxhkd.enable then "sxhkd &" else ""} -exec ${config.desktop.window-manager.command} -''; - }; - }; -} diff --git a/modules/desktop/status-bar/default.nix b/modules/desktop/status-bar/default.nix deleted file mode 100644 index 45cb3a0..0000000 --- a/modules/desktop/status-bar/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./polybar - ]; -} diff --git a/modules/desktop/status-bar/polybar/bar/default.nix b/modules/desktop/status-bar/polybar/bar/default.nix deleted file mode 100644 index 23a43c4..0000000 --- a/modules/desktop/status-bar/polybar/bar/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib }: - -{ - "bar/main" = import ./main.nix { inherit config lib; }; -} diff --git a/modules/desktop/status-bar/polybar/bar/main.nix b/modules/desktop/status-bar/polybar/bar/main.nix deleted file mode 100644 index a389b8c..0000000 --- a/modules/desktop/status-bar/polybar/bar/main.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, lib }: - -with config.scheme.withHashtag; -let - largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0)); -in { - width = "\${env:POLYBAR_WIDTH}"; - fixed-center = false; - height = 35; - - border-top-size = 1; - border-bottom-size = 1; - border-left-size = 1; - border-right-size = 1; - border-color = base03; - - background = base00; - foreground = base05; - - line-size = 3; - line-color = base08; - - padding-left = 1; - padding-right = 1; - - module-margin-left = 1; - module-margin-right = 1; - - separator = "%{F${base03}}%{T3}│%{T-}%{F-}"; - - offset-x = "\${env:POLYBAR_OFFSET}"; - offset-y = "\${env:POLYBAR_OFFSET}"; - - font-0 = "${config.fonts.normal}:pixelsize=${toString config.fonts.size};3"; - font-1 = "${config.fonts.normal}:weight=Bold:pixelsize=${largerFontSize};3"; - font-2 = "${config.fonts.normal}:style=Light:pixelsize=${largerFontSize};2"; - - modules-left = - if config.desktop.window-manager.bspwm.enable then - "bspwm separator" - else if config.desktop.window-manager.i3.enable then - "i3 separator" - else ""; - modules-center = "xwindow"; - modules-right = "separator memory cpu battery time date kernel-version"; -} diff --git a/modules/desktop/status-bar/polybar/default.nix b/modules/desktop/status-bar/polybar/default.nix deleted file mode 100644 index 76901f6..0000000 --- a/modules/desktop/status-bar/polybar/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - polybarPackage = pkgs.polybar.override { - i3Support = config.desktop.window-manager.i3.enable; - }; -in -{ - options.desktop.status-bar.polybar = { - enable = lib.mkEnableOption "Enables polybar."; - command = lib.mkOption { - type = lib.types.str; - description = "Command to run polybar."; - # This command calculates the width of the polybar to create those gaps - default = toString (pkgs.writeShellScript "polybar-run.sh" '' -#!/bin/sh - -MONITOR_WIDTH=$(xrandr | grep '*' | awk '{print $1}' | cut -d'x' -f1 | head -n1) -OFFSET=${toString config.desktop.window-manager.gap} -POLYBAR_WIDTH=$((MONITOR_WIDTH - 2 * OFFSET)) POLYBAR_OFFSET=$OFFSET ${polybarPackage}/bin/polybar main & -''); - }; - }; - - config = lib.mkIf config.desktop.status-bar.polybar.enable { - services.polybar.enable = true; - services.polybar.script = config.desktop.status-bar.polybar.command; - services.polybar.package = polybarPackage; - services.polybar.config = lib.mkMerge [ - (import ./bar { inherit config lib; }) - (import ./module { inherit config lib; }) - ]; - }; -} diff --git a/modules/desktop/status-bar/polybar/module/battery.nix b/modules/desktop/status-bar/polybar/module/battery.nix deleted file mode 100644 index 6e25e99..0000000 --- a/modules/desktop/status-bar/polybar/module/battery.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/battery"; - battery = "BAT0"; - adapter = "ADP1"; - - format-charging = "%{T2}%{F${base03}}<animation-charging>%{F-}%{T-} <label-charging>"; - format-discharging = "%{T2}%{F${base03}}<ramp-capacity>%{F-}%{T-} <label-discharging>"; - format-full-prefix = " "; - - ramp-capacity-0 = ""; - ramp-capacity-1 = ""; - ramp-capacity-2 = ""; - ramp-capacity-3 = ""; - ramp-capacity-4 = ""; - ramp-capacity-5 = ""; - ramp-capacity-6 = ""; - ramp-capacity-7 = ""; - ramp-capacity-8 = ""; - ramp-capacity-9 = ""; - - animation-charging-0 = ""; - animation-charging-1 = ""; - animation-charging-2 = ""; - animation-charging-3 = ""; - animation-charging-4 = ""; - animation-charging-5 = ""; - animation-charging-6 = ""; - animation-charging-7 = ""; - animation-charging-8 = ""; - animation-charging-9 = ""; - - animation-charging-framerate = 750; -} diff --git a/modules/desktop/status-bar/polybar/module/bspwm.nix b/modules/desktop/status-bar/polybar/module/bspwm.nix deleted file mode 100644 index ed82946..0000000 --- a/modules/desktop/status-bar/polybar/module/bspwm.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/bspwm"; - - label-focused = "%index%"; - label-focused-underline = "${base0D}"; - label-focused-padding = 2; - - label-occupied = "%index%"; - label-occupied-padding = 2; - - label-urgent = "%index%"; - label-urgent-underline = "${base08}"; - label-urgent-padding = 2; - - label-empty = "%index%"; - label-empty-foreground = "${base03}"; - label-empty-padding = 2; -} diff --git a/modules/desktop/status-bar/polybar/module/cpu.nix b/modules/desktop/status-bar/polybar/module/cpu.nix deleted file mode 100644 index d37b5cc..0000000 --- a/modules/desktop/status-bar/polybar/module/cpu.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/cpu"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%percentage%%"; -} diff --git a/modules/desktop/status-bar/polybar/module/date.nix b/modules/desktop/status-bar/polybar/module/date.nix deleted file mode 100644 index 56e2fa6..0000000 --- a/modules/desktop/status-bar/polybar/module/date.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 60; - date = "%d/%m/%Y"; - label = "%date%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/desktop/status-bar/polybar/module/default.nix b/modules/desktop/status-bar/polybar/module/default.nix deleted file mode 100644 index 5507569..0000000 --- a/modules/desktop/status-bar/polybar/module/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib }: - -{ - "module/separator" = import ./separator.nix { inherit config; }; - "module/xwindow" = import ./xwindow.nix { inherit config; }; - "module/bspwm" = - lib.mkIf - config.desktop.window-manager.bspwm.enable - (import ./bspwm.nix { inherit config; }); - "module/i3" = - lib.mkIf - config.desktop.window-manager.i3.enable - (import ./i3.nix { inherit config; }); - "module/cpu" = import ./cpu.nix { inherit config; }; - "module/memory" = import ./memory.nix { inherit config; }; - "module/date" = import ./date.nix { inherit config; }; - "module/time" = import ./time.nix { inherit config; }; - "module/battery" = import ./battery.nix { inherit config; }; - "module/kernel-version" = import ./kernel-version.nix { inherit config; }; -} diff --git a/modules/desktop/status-bar/polybar/module/i3.nix b/modules/desktop/status-bar/polybar/module/i3.nix deleted file mode 100644 index 46595cd..0000000 --- a/modules/desktop/status-bar/polybar/module/i3.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/i3"; - - pin-workspaces = true; - - label-focused = "%index%"; - label-focused-underline = "${base0D}"; - label-focused-padding = 2; - - label-occupied = "%index%"; - label-occupied-padding = 2; - - label-urgent = "%index%"; - label-urgent-underline = "${base08}"; - label-urgent-padding = 2; - - label-empty = "%index%"; - label-empty-foreground = "${base03}"; - label-empty-padding = 2; -} diff --git a/modules/desktop/status-bar/polybar/module/kernel-version.nix b/modules/desktop/status-bar/polybar/module/kernel-version.nix deleted file mode 100644 index 8f94e37..0000000 --- a/modules/desktop/status-bar/polybar/module/kernel-version.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "custom/script"; - exec = "uname -r"; - interval = 1024; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%output%"; -} diff --git a/modules/desktop/status-bar/polybar/module/memory.nix b/modules/desktop/status-bar/polybar/module/memory.nix deleted file mode 100644 index 79033f1..0000000 --- a/modules/desktop/status-bar/polybar/module/memory.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/memory"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%percentage_used%%"; -} diff --git a/modules/desktop/status-bar/polybar/module/separator.nix b/modules/desktop/status-bar/polybar/module/separator.nix deleted file mode 100644 index 3cd1430..0000000 --- a/modules/desktop/status-bar/polybar/module/separator.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "custom/text"; - label = " "; -} diff --git a/modules/desktop/status-bar/polybar/module/time.nix b/modules/desktop/status-bar/polybar/module/time.nix deleted file mode 100644 index b8ea545..0000000 --- a/modules/desktop/status-bar/polybar/module/time.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 30; - time = "%H:%M"; - label = "%time%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/desktop/status-bar/polybar/module/xwindow.nix b/modules/desktop/status-bar/polybar/module/xwindow.nix deleted file mode 100644 index 833899e..0000000 --- a/modules/desktop/status-bar/polybar/module/xwindow.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/xwindow"; - label = "%title:0:30:...%"; -} diff --git a/modules/desktop/window-manager/bspwm/bspwmrc b/modules/desktop/window-manager/bspwm/bspwmrc deleted file mode 100644 index 8a3a35a..0000000 --- a/modules/desktop/window-manager/bspwm/bspwmrc +++ /dev/null @@ -1,3 +0,0 @@ -for monitor in $(xrandr -q | grep -w 'connected' | cut -d' ' -f1); do - bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6' -done diff --git a/modules/desktop/window-manager/bspwm/default.nix b/modules/desktop/window-manager/bspwm/default.nix deleted file mode 100644 index e275135..0000000 --- a/modules/desktop/window-manager/bspwm/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.desktop.window-manager.bspwm = { - enable = lib.mkEnableOption "Enables bspwm."; - }; - - config = lib.mkIf config.desktop.window-manager.bspwm.enable { - assertions = [ - { - assertion = config.desktop.window-manager.sxhkd.enable; - message ="Module desktop.window-manager.bspwm requires desktop.window-manager.sxhkd module to be enabled."; - } - ]; - - desktop.window-manager.default = lib.mkDefault "bspwm"; - desktop.window-manager.command = - if config.desktop.window-manager.default == "bspwm" then - "${pkgs.bspwm}/bin/bspwm" - else lib.mkDefault ""; - - xsession.windowManager.bspwm.enable = true; - - xsession.windowManager.bspwm.settings = with config.scheme.withHashtag; { - window_gap = config.desktop.window-manager.gap; - split_ratio = 0.5; - single_monocle = true; - borderless_monocle = false; - gapless_monocle = false; - focus_follows_pointer = true; - pointer_follows_focus = false; - pointer_motion_interval = 40; - pointer_modifier = "mod1"; # alt key - pointer_action1 = "resize_side"; - pointer_action2 = "move"; - pointer_action3 = "resize_corner"; - normal_border_color = base02; - active_border_color = base02; - focused_border_color = base03; - }; - - xsession.windowManager.bspwm.rules = { - "floating-termial" = { - state = "floating"; - sticky = true; - rectangle = "1000x600+0+0"; - center = true; - follow = true; - }; - }; - - xsession.windowManager.bspwm.extraConfig = builtins.readFile ./bspwmrc; - }; -} diff --git a/modules/desktop/window-manager/default.nix b/modules/desktop/window-manager/default.nix deleted file mode 100644 index 2f36bce..0000000 --- a/modules/desktop/window-manager/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./bspwm - ./i3 - ./sxhkd - ]; - - options.desktop.window-manager = { - default = lib.mkOption { - type = lib.types.enum [ - "bspwm" - "i3" - ]; - description = "Default window manager."; - }; - - command = lib.mkOption { - type = lib.types.str; - description = "Command window manager program."; - }; - - gap = lib.mkOption { - type = lib.types.int; - default = 10; - description = "The spacing between windows."; - }; - }; -} diff --git a/modules/desktop/window-manager/i3/default.nix b/modules/desktop/window-manager/i3/default.nix deleted file mode 100644 index 369fe34..0000000 --- a/modules/desktop/window-manager/i3/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.desktop.window-manager.i3 = { - enable = lib.mkEnableOption "Enables i3."; - }; - - config = lib.mkIf config.desktop.window-manager.i3.enable { - # Set i3 as the default window manager - desktop.window-manager.default = lib.mkDefault "i3"; - desktop.window-manager.command = - if config.desktop.window-manager.default == "i3" then - "${pkgs.i3}/bin/i3" - else lib.mkDefault ""; - - xsession.windowManager.i3.enable = true; - - xsession.windowManager.i3.config = { - modifier = "Mod4"; - gaps = { - inner = config.desktop.window-manager.gap; - }; - terminal = config.tools.terminal.command; - fonts = { - names = [ "FiraCode Nerd Font" ]; - size = 11.0; - }; - bars = [ - { - command = - lib.mkIf - config.desktop.status-bar.polybar.enable - config.desktop.status-bar.polybar.command; - } - ]; - }; - }; -} diff --git a/modules/desktop/window-manager/sxhkd/default.nix b/modules/desktop/window-manager/sxhkd/default.nix deleted file mode 100644 index cab7351..0000000 --- a/modules/desktop/window-manager/sxhkd/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options.desktop.window-manager.sxhkd = { - enable = lib.mkEnableOption "Enables sxhkd."; - }; - - config = lib.mkIf config.desktop.window-manager.sxhkd.enable { - services.sxhkd.enable = true; - services.sxhkd.keybindings = - let - modKey = "alt"; - createKeybinding = keybinding: description: command: { - "# ${description}\n${modKey} + ${keybinding}" = command; - }; - in lib.mkMerge [ - ( - if config.desktop.window-manager.bspwm.enable then - (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; }) - else {} - ) - (lib.mkMerge [ - (createKeybinding - "s" - "Show keybindings." - "${config.tools.terminal.command} --title 'Keybindings' --class floating-termial -e ${pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh)}" - ) - - (createKeybinding - "r" - "Application launcher." - config.desktop.application-launcher.command) - - (createKeybinding - "t" - "Launch terminal." - config.tools.terminal.command) - - (createKeybinding - "f" - "Launch File Manager." - "${config.tools.terminal.command} --title 'File Manager' --class floating-termial -e ${config.tools.file-manager.command}") - ]) - ]; - }; -} diff --git a/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix b/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix deleted file mode 100644 index ed62ed4..0000000 --- a/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ createKeybinding, pkgs, lib }: - -let - bspc = "${pkgs.bspwm}/bin/bspc"; -in lib.mkMerge [ - (createKeybinding - "q" - "Kill current window." - "${bspc} node -c") - - (createKeybinding - "{1-9,0}" - "Switch workspace." - "${bspc} desktop -f {1-9,10}") - - (createKeybinding - "shift + {1-9,0}" - "Move window to workspace." - "${bspc} node -d {1-9,10} --follow") - - (createKeybinding - "{n,d,m}" - "Set current window mode (tiled, floating, fullscreen)." - "${bspc} node focused -t {tiled,floating,fullscreen}") - - (createKeybinding - "{_,shift + }{h,j,k,l}" - "Navigate between windows." - "${bspc} node --{focus,swap} {west,south,north,east}") - - # the indentation for each line is required to work with the help prompt - (createKeybinding - "ctrl + {h,j,k,l}" - "Resize current window." - '' - ${bspc} node {@parent/second -z left -20 0; \ - @parent/first -z right -20 0, \ - @parent/second -z top 0 +20; \ - @parent/first -z bottom 0 +20, \ - @parent/first -z bottom 0 -20; \ - @parent/second -z top 0 -20, \ - @parent/first -z right +20 0; \ - @parent/second -z left +20 0} -'') -] diff --git a/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh b/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh deleted file mode 100755 index 01bb05f..0000000 --- a/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# Path to your sxhkd config file -SXHKD_FILE="$HOME/.config/sxhkd/sxhkdrc" - -# Function to wrap text to a specified width -wrap_text() { - local text="$1" - local width="$2" - echo "$text" | fold -s -w "$width" -} - -# Get terminal width -terminal_width=$(tput cols) - -# Set the table width to the full terminal width, leaving space for borders -table_width=$((terminal_width - 4)) # 4 for the borders and space between columns - -# Set keybinding column width to half of the available width -max_keybinding_length=$((table_width / 2)) - -# Length of the cotent inside the cell (2 spaces are substracted for padding) -max_keybinding_content_length=$((max_keybinding_length - 2)) - -# Set the description column width to the other half -description_width=$((table_width - max_keybinding_length - 1)) # 1 for the separator between columns - -# Length of the cotent inside the cell (2 spaces are substracted for padding) -description_content_width=$((description_width - 2)) - -# Generate the top border line and row separator -border_line="├$(printf '%.0s─' $(seq 1 $max_keybinding_length))┼$(printf '%.0s─' $(seq 1 $description_width))┤" - -# Pipe all output to less -{ - # Print table header with borders - echo "┌$(printf '%.0s─' $(seq 1 $max_keybinding_length))┬$(printf '%.0s─' $(seq 1 $description_width))┐" - printf "│ %-*s │ %-*s │\n" "$max_keybinding_content_length" "KEYBINDING" "$description_content_width" "DESCRIPTION" - - # Initialize variables - description="" - - # Load the sxhkd file into an array - mapfile -t lines < "$SXHKD_FILE" - - # Loop through lines for output - for line in "${lines[@]}"; do - # Check if the line is a comment - if [[ $line =~ ^# ]]; then - # Remove the "#" and any leading/trailing whitespace to capture the description - description="${line#\# }" - elif [[ $line =~ ^[^#[:space:]] ]]; then - # If it's a keybinding line, store it - keybinding="$line" - # Move to the next line for the command - command="${lines[((++i))]}" - - # Wrap the description to the calculated width - wrapped_description=$(wrap_text "$description" "$description_width") - - # Print the keybinding with a border line above and below it - echo "$border_line" - printf "│ %-*s │ %-*s │\n" "$max_keybinding_content_length" "$keybinding" "$description_content_width" "$(echo "$wrapped_description" | head -n 1)" - - # Print wrapped description lines with empty keybinding column - echo "$wrapped_description" | sed '1d' | while read -r continuation; do - printf "│ %-*s │ %-*s │\n" "$max_keybinding_content_length" "" "$description_content_width" "$continuation" - done - - # Reset description for the next keybinding - description="" - fi - done - - # Print the final border line - echo "└$(printf '%.0s─' $(seq 1 $max_keybinding_length))┴$(printf '%.0s─' $(seq 1 $description_width))┘" -} | less diff --git a/modules/desktop/xdg/default.nix b/modules/desktop/xdg/default.nix deleted file mode 100644 index a1614f4..0000000 --- a/modules/desktop/xdg/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options.desktop.xdg = { - portal.enable = lib.mkEnableOption "Enables xdg desktop portal."; - }; - - config = lib.mkIf config.desktop.xdg.portal.enable { - xdg.portal.enable = true; - xdg.portal.xdgOpenUsePortal = true; - - xdg.portal.config = { - common = { - default = [ - "gtk" - ]; - }; - }; - - xdg.portal.extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; -} diff --git a/modules/scripts/default.nix b/modules/scripts/default.nix index 3802b82..6e39f32 100644 --- a/modules/scripts/default.nix +++ b/modules/scripts/default.nix @@ -7,15 +7,7 @@ config = lib.mkIf config.scripts.enable { home.file."scripts/restart-network" = { - source = ./scripts/restart-network.sh; - executable = true; - }; - - home.file."scripts/home-manager-switch" = { - text = '' -#!/bin/sh -home-manager switch --flake ${config.baseDirectory}/#${config.home.username} - ''; + source = ./restart-network.sh; executable = true; }; }; diff --git a/modules/scripts/scripts/restart-network.sh b/modules/scripts/restart-network.sh index fc2b712..fc2b712 100644 --- a/modules/scripts/scripts/restart-network.sh +++ b/modules/scripts/restart-network.sh diff --git a/modules/shell/bash/default.nix b/modules/shell/bash/default.nix deleted file mode 100644 index b14669e..0000000 --- a/modules/shell/bash/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.shell.bash = { - enable = lib.mkOption { - type = lib.types.bool; - description = "Enables bash."; - default = true; - }; - }; - - config = lib.mkIf config.shell.bash.enable { - shell.default = lib.mkDefault "bash"; - shell.command = - lib.mkIf - (config.shell.default == "bash") - "${pkgs.zsh}/bin/bash"; - - programs.bash.enable = true; - programs.bash.historyFile = "${config.xdg.cacheHome}/bash/history"; - programs.bash.shellAliases = config.shell.alias; - programs.bash.bashrcExtra = '' -${if config.tools.utils.fzf.enable then - "eval \"$(fzf --bash)\"" -else ""} -${if config.scripts.enable then - "export PATH=${config.home.homeDirectory}/scripts:$PATH" -else ""} - ''; - - home.activation.createBashCacheDirectory = - lib.hm.dag.entryAfter - [ "writeBoundary" ] - "mkdir -p ${config.xdg.cacheHome}/bash"; - }; -} diff --git a/modules/shell/default.nix b/modules/shell/default.nix deleted file mode 100644 index c2eada9..0000000 --- a/modules/shell/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, pkgs, ... }: - -{ - imports = [ - ./bash - ./zsh - ]; - - options.shell = { - default = lib.mkOption { - type = lib.types.enum [ - "bash" - "zsh" - ]; - description = "Default shell."; - }; - - command = lib.mkOption { - type = lib.types.str; - description = "Command for the default shell."; - }; - - alias = lib.mkOption { - type = lib.types.attrs; - description = "Shell aliases."; - }; - }; -} diff --git a/modules/tools/viewer/bat/default.nix b/modules/tools/bat/default.nix index 4d52a62..d459042 100644 --- a/modules/tools/viewer/bat/default.nix +++ b/modules/tools/bat/default.nix @@ -1,19 +1,19 @@ { config, lib, pkgs, ... }: { - options.tools.viewer.bat = { + options.tools.bat = { enable = lib.mkEnableOption "Enables bat."; }; - config = lib.mkIf config.tools.viewer.bat.enable { + config = lib.mkIf config.tools.bat.enable { programs.bat.enable = true; programs.bat.config = { tabs = "4"; theme = "custom-theme"; }; - shell.alias."cat" = "${pkgs.bat}/bin/bat -pp"; - shell.alias."less" = "${pkgs.bat}/bin/bat --paging always"; - home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always"; + # shell.alias."cat" = "${pkgs.bat}/bin/bat -pp"; + # shell.alias."less" = "${pkgs.bat}/bin/bat --paging always"; + # home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always"; xdg.configFile."bat/themes/custom-theme.tmTheme".source = config.scheme { template = builtins.readFile ./theme.mustache.tmTheme; diff --git a/modules/tools/viewer/bat/theme.mustache.tmTheme b/modules/tools/bat/theme.mustache.tmTheme index 844b80d..844b80d 100644 --- a/modules/tools/viewer/bat/theme.mustache.tmTheme +++ b/modules/tools/bat/theme.mustache.tmTheme diff --git a/modules/tools/default.nix b/modules/tools/default.nix index 0180df9..20b661d 100644 --- a/modules/tools/default.nix +++ b/modules/tools/default.nix @@ -2,12 +2,15 @@ { imports = [ - ./editor - ./file-manager + ./bat + ./feh + ./fzf ./git - ./system-monitor - ./terminal - ./utils - ./viewer + ./htop + ./kitty + ./lsd + ./neovim + ./nnn + ./zsh ]; } diff --git a/modules/tools/editor/default.nix b/modules/tools/editor/default.nix deleted file mode 100644 index fd2da1a..0000000 --- a/modules/tools/editor/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./neovim - ]; -} diff --git a/modules/tools/viewer/feh/default.nix b/modules/tools/feh/default.nix index d90e8b1..8aa5631 100644 --- a/modules/tools/viewer/feh/default.nix +++ b/modules/tools/feh/default.nix @@ -1,11 +1,11 @@ { config, lib, pkgs, ... }: { - options.tools.viewer.feh = { + options.tools.feh = { enable = lib.mkEnableOption "Enables feh."; }; - config = lib.mkIf config.tools.viewer.feh.enable { + config = lib.mkIf config.tools.git.enable { programs.feh.enable = true; }; } diff --git a/modules/tools/file-manager/default.nix b/modules/tools/file-manager/default.nix deleted file mode 100644 index 4889f5b..0000000 --- a/modules/tools/file-manager/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./lf - ./lsd - ./nnn - ]; - - options.tools.file-manager = { - default = lib.mkOption { - type = lib.types.enum [ - "nnn" - "lf" - ]; - description = "Default file manager."; - }; - - command = lib.mkOption { - type = lib.types.str; - description = "Command for the default file manager program."; - }; - }; -} diff --git a/modules/tools/file-manager/lf/default.nix b/modules/tools/file-manager/lf/default.nix deleted file mode 100644 index 2fab997..0000000 --- a/modules/tools/file-manager/lf/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - options.tools.file-manager.lf = { - enable = lib.mkEnableOption "Enables lf."; - }; - - config = lib.mkIf config.tools.file-manager.lf.enable { - tools.file-manager.default = lib.mkDefault "lf"; - tools.file-manager.command = - lib.mkIf - (config.tools.file-manager.default == "lf") - "${pkgs.lf}/bin/lf"; - - programs.lf.enable = true; - programs.lf.settings = { - hidden = true; - }; - programs.lf.previewer.source = pkgs.writeShellScript - "previewer.sh" - '' -#!/bin/sh -unset COLORTERM -${if config.tools.viewer.bat.enable then - "bat -pp --line-range=:500 --color=always" -else "cat"} "$1" - ''; - programs.lf.extraConfig = "set icons"; - - xdg.configFile."lf/icons".source = ./icons; - }; -} diff --git a/modules/tools/file-manager/lf/icons b/modules/tools/file-manager/lf/icons deleted file mode 100644 index 2e9d8a2..0000000 --- a/modules/tools/file-manager/lf/icons +++ /dev/null @@ -1,334 +0,0 @@ -# vim:ft=conf - -# These examples require Nerd Fonts or a compatible font to be used. -# See https://www.nerdfonts.com for more information. - -# file types (with matching order) -ln # LINK -or # ORPHAN -tw t # STICKY_OTHER_WRITABLE -ow # OTHER_WRITABLE -st t # STICKY -di # DIR -pi p # FIFO -so s # SOCK -bd b # BLK -cd c # CHR -su u # SETUID -sg g # SETGID -ex # EXEC -fi # FILE - -# file extensions (vim-devicons) -*.styl -*.sass -*.scss -*.htm -*.html -*.slim -*.haml -*.ejs -*.css -*.less -*.md -*.mdx -*.markdown -*.rmd -*.json -*.webmanifest -*.js -*.mjs -*.jsx -*.rb -*.gemspec -*.rake -*.php -*.py -*.pyc -*.pyo -*.pyd -*.coffee -*.mustache -*.hbs -*.conf -*.ini -*.yml -*.yaml -*.toml -*.bat -*.mk -*.jpg -*.jpeg -*.bmp -*.png -*.webp -*.gif -*.ico -*.twig -*.cpp -*.c++ -*.cxx -*.cc -*.cp -*.c -*.cs -*.h -*.hh -*.hpp -*.hxx -*.hs -*.lhs -*.nix -*.lua -*.java -*.sh -*.fish -*.bash -*.zsh -*.ksh -*.csh -*.awk -*.ps1 -*.ml λ -*.mli λ -*.diff -*.db -*.sql -*.dump -*.clj -*.cljc -*.cljs -*.edn -*.scala -*.go -*.dart -*.xul -*.sln -*.suo -*.pl -*.pm -*.t -*.rss -'*.f#' -*.fsscript -*.fsx -*.fs -*.fsi -*.rs -*.rlib -*.d -*.erl -*.hrl -*.ex -*.exs -*.eex -*.leex -*.heex -*.vim -*.ai -*.psd -*.psb -*.ts -*.tsx -*.jl -*.pp -*.vue -*.elm -*.swift -*.xcplayground -*.tex -*.r -*.rproj -*.sol -*.pem - -# file names (vim-devicons) (case-insensitive not supported in lf) -*gruntfile.coffee -*gruntfile.js -*gruntfile.ls -*gulpfile.coffee -*gulpfile.js -*gulpfile.ls -*mix.lock -*dropbox -*.ds_store -*.gitconfig -*.gitignore -*.gitattributes -*.gitlab-ci.yml -*.bashrc -*.zshrc -*.zshenv -*.zprofile -*.vimrc -*.gvimrc -*_vimrc -*_gvimrc -*.bashprofile -*favicon.ico -*license -*node_modules -*react.jsx -*procfile -*dockerfile -*docker-compose.yml -*docker-compose.yaml -*compose.yml -*compose.yaml -*rakefile -*config.ru -*gemfile -*makefile -*cmakelists.txt -*robots.txt - -# file names (case-sensitive adaptations) -*Gruntfile.coffee -*Gruntfile.js -*Gruntfile.ls -*Gulpfile.coffee -*Gulpfile.js -*Gulpfile.ls -*Dropbox -*.DS_Store -*LICENSE -*React.jsx -*Procfile -*Dockerfile -*Docker-compose.yml -*Docker-compose.yaml -*Rakefile -*Gemfile -*Makefile -*CMakeLists.txt - -# file patterns (file name adaptations) -*jquery.min.js -*angular.min.js -*backbone.min.js -*require.min.js -*materialize.min.js -*materialize.min.css -*mootools.min.js -*vimrc -Vagrantfile - -# archives or compressed (extensions from dircolors defaults) -*.tar -*.tgz -*.arc -*.arj -*.taz -*.lha -*.lz4 -*.lzh -*.lzma -*.tlz -*.txz -*.tzo -*.t7z -*.zip -*.z -*.dz -*.gz -*.lrz -*.lz -*.lzo -*.xz -*.zst -*.tzst -*.bz2 -*.bz -*.tbz -*.tbz2 -*.tz -*.deb -*.rpm -*.jar -*.war -*.ear -*.sar -*.rar -*.alz -*.ace -*.zoo -*.cpio -*.7z -*.rz -*.cab -*.wim -*.swm -*.dwm -*.esd - -# image formats (extensions from dircolors defaults) -*.jpg -*.jpeg -*.mjpg -*.mjpeg -*.gif -*.bmp -*.pbm -*.pgm -*.ppm -*.tga -*.xbm -*.xpm -*.tif -*.tiff -*.png -*.svg -*.svgz -*.mng -*.pcx -*.mov -*.mpg -*.mpeg -*.m2v -*.mkv -*.webm -*.ogm -*.mp4 -*.m4v -*.mp4v -*.vob -*.qt -*.nuv -*.wmv -*.asf -*.rm -*.rmvb -*.flc -*.avi -*.fli -*.flv -*.gl -*.dl -*.xcf -*.xwd -*.yuv -*.cgm -*.emf -*.ogv -*.ogx - -# audio formats (extensions from dircolors defaults) -*.aac -*.au -*.flac -*.m4a -*.mid -*.midi -*.mka -*.mp3 -*.mpc -*.ogg -*.ra -*.wav -*.oga -*.opus -*.spx -*.xspf - -# other formats -*.pdf diff --git a/modules/tools/file-manager/lsd/default.nix b/modules/tools/file-manager/lsd/default.nix deleted file mode 100644 index d99413d..0000000 --- a/modules/tools/file-manager/lsd/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs, lib, config, ... }: - -{ - options.tools.file-manager.lsd = { - enable = lib.mkEnableOption "Enables lsd."; - }; - - config = lib.mkIf config.tools.file-manager.lsd.enable { - programs.lsd.enable = true; - programs.lsd.enableAliases = true; - programs.lsd.settings.icons.separator = " "; - }; -} diff --git a/modules/tools/file-manager/nnn/default.nix b/modules/tools/file-manager/nnn/default.nix deleted file mode 100644 index a41096c..0000000 --- a/modules/tools/file-manager/nnn/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - options.tools.file-manager.nnn = { - enable = lib.mkEnableOption "Enables nnn."; - }; - - config = - let - nnnWithNerdIcons = pkgs.nnn.override ({ withNerdIcons = true; }); - in lib.mkIf config.tools.file-manager.nnn.enable { - tools.file-manager.default = lib.mkDefault "nnn"; - tools.file-manager.command = - lib.mkIf - (config.tools.file-manager.default == "nnn") - "${nnnWithNerdIcons}/bin/nnn -H -d"; - - programs.nnn.enable = true; - programs.nnn.package = nnnWithNerdIcons; - programs.nnn.plugins.src = "${nnnWithNerdIcons}/share/plugins"; - shell.alias."nnn" = "${nnnWithNerdIcons}/bin/nnn -H -d"; - }; -} diff --git a/modules/tools/utils/fzf/default.nix b/modules/tools/fzf/default.nix index e6378bc..169a07f 100644 --- a/modules/tools/utils/fzf/default.nix +++ b/modules/tools/fzf/default.nix @@ -1,11 +1,11 @@ { config, lib,... }: { - options.tools.utils.fzf = { + options.tools.fzf = { enable = lib.mkEnableOption "Enables fzf."; }; - config = lib.mkIf config.tools.utils.fzf.enable { + config = lib.mkIf config.tools.fzf.enable { programs.fzf.enable = true; programs.fzf.defaultOptions = [ "--height 100%" diff --git a/modules/tools/system-monitor/htop/default.nix b/modules/tools/htop/default.nix index c19ab60..d4037e6 100644 --- a/modules/tools/system-monitor/htop/default.nix +++ b/modules/tools/htop/default.nix @@ -1,11 +1,11 @@ { pkgs, lib, config, ... }: { - options.tools.system-monitor.htop = { + options.tools.htop = { enable = lib.mkEnableOption "Enables htop."; }; - config = lib.mkIf config.tools.system-monitor.htop.enable { + config = lib.mkIf config.tools.htop.enable { programs.htop.enable = true; programs.htop.package = pkgs.htop-vim; }; diff --git a/modules/tools/terminal/kitty/default.nix b/modules/tools/kitty/default.nix index 94f013b..74b4519 100644 --- a/modules/tools/terminal/kitty/default.nix +++ b/modules/tools/kitty/default.nix @@ -1,20 +1,14 @@ { pkgs, config, lib, ... }: { - options.tools.terminal.kitty = { + options.tools.kitty = { enable = lib.mkEnableOption "Enables kitty. WARNING! Currently faces problems with color rendering with picom."; }; - config = lib.mkIf config.tools.terminal.kitty.enable { + config = lib.mkIf config.tools.kitty.enable { programs.kitty.enable = true; - tools.terminal.default = lib.mkDefault "kitty"; - tools.terminal.command = - lib.mkIf - (config.tools.terminal.default == "kitty") - "${pkgs.kitty}/bin/kitty"; - programs.kitty.settings = with config.scheme.withHashtag; { - window_padding_width = config.desktop.window-manager.gap; + window_padding_width = 10; font_size = config.fonts.size; font_family = config.fonts.normal; filter_notification = "all"; @@ -48,8 +42,6 @@ selection_background = base03; selection_foreground = base00; - - shell = config.shell.command; }; }; } diff --git a/modules/tools/lsd/default.nix b/modules/tools/lsd/default.nix new file mode 100644 index 0000000..feb1481 --- /dev/null +++ b/modules/tools/lsd/default.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + options.tools.lsd = { + enable = lib.mkEnableOption "Enables lsd."; + }; + + config = lib.mkIf config.tools.lsd.enable { + programs.lsd.enable = true; + programs.lsd.settings.icons.separator = " "; + }; +} diff --git a/modules/tools/editor/neovim/config/default.nix b/modules/tools/neovim/config/default.nix index 4514d2f..4514d2f 100644 --- a/modules/tools/editor/neovim/config/default.nix +++ b/modules/tools/neovim/config/default.nix diff --git a/modules/tools/editor/neovim/config/keybindings.lua b/modules/tools/neovim/config/keybindings.lua index 3f2c9bf..3f2c9bf 100644 --- a/modules/tools/editor/neovim/config/keybindings.lua +++ b/modules/tools/neovim/config/keybindings.lua diff --git a/modules/tools/editor/neovim/config/options.lua b/modules/tools/neovim/config/options.lua index fc0b04c..fc0b04c 100644 --- a/modules/tools/editor/neovim/config/options.lua +++ b/modules/tools/neovim/config/options.lua diff --git a/modules/tools/editor/neovim/default.nix b/modules/tools/neovim/default.nix index 7d257ba..2c0b7aa 100644 --- a/modules/tools/editor/neovim/default.nix +++ b/modules/tools/neovim/default.nix @@ -1,7 +1,7 @@ { pkgs, config, lib, ... }: { - options.tools.editor.neovim = { + options.tools.neovim = { enable = lib.mkEnableOption "Enables neovim."; profile = lib.mkOption { type = lib.types.enum [ @@ -16,7 +16,7 @@ config = let plugins = import ./plugins { inherit config pkgs lib; }; - in lib.mkIf config.tools.editor.neovim.enable { + in lib.mkIf config.tools.neovim.enable { programs.neovim.enable = true; programs.neovim.viAlias = true; programs.neovim.vimAlias = true; diff --git a/modules/tools/editor/neovim/plugins/config/base16.mustache.lua b/modules/tools/neovim/plugins/config/base16.mustache.lua index 3c13fcc..3c13fcc 100644 --- a/modules/tools/editor/neovim/plugins/config/base16.mustache.lua +++ b/modules/tools/neovim/plugins/config/base16.mustache.lua diff --git a/modules/tools/editor/neovim/plugins/config/comment.lua b/modules/tools/neovim/plugins/config/comment.lua index 9086261..9086261 100644 --- a/modules/tools/editor/neovim/plugins/config/comment.lua +++ b/modules/tools/neovim/plugins/config/comment.lua diff --git a/modules/tools/editor/neovim/plugins/config/default.nix b/modules/tools/neovim/plugins/config/default.nix index dcdb371..9ae2485 100644 --- a/modules/tools/editor/neovim/plugins/config/default.nix +++ b/modules/tools/neovim/plugins/config/default.nix @@ -1,7 +1,7 @@ { config }: let - fullExtra = if config.tools.editor.neovim.profile == "full" then + fullExtra = if config.tools.neovim.profile == "full" then '' ${builtins.readFile ./lsp-config.lua} ${builtins.readFile ./dressing.lua} diff --git a/modules/tools/editor/neovim/plugins/config/dressing.lua b/modules/tools/neovim/plugins/config/dressing.lua index 6d14d47..6d14d47 100644 --- a/modules/tools/editor/neovim/plugins/config/dressing.lua +++ b/modules/tools/neovim/plugins/config/dressing.lua diff --git a/modules/tools/editor/neovim/plugins/config/lsp-config.lua b/modules/tools/neovim/plugins/config/lsp-config.lua index cca4116..cca4116 100644 --- a/modules/tools/editor/neovim/plugins/config/lsp-config.lua +++ b/modules/tools/neovim/plugins/config/lsp-config.lua diff --git a/modules/tools/editor/neovim/plugins/config/lualine.mustache.lua b/modules/tools/neovim/plugins/config/lualine.mustache.lua index bf4f1d1..bf4f1d1 100644 --- a/modules/tools/editor/neovim/plugins/config/lualine.mustache.lua +++ b/modules/tools/neovim/plugins/config/lualine.mustache.lua diff --git a/modules/tools/editor/neovim/plugins/config/noice.mustache.lua b/modules/tools/neovim/plugins/config/noice.mustache.lua index a258c8e..a258c8e 100644 --- a/modules/tools/editor/neovim/plugins/config/noice.mustache.lua +++ b/modules/tools/neovim/plugins/config/noice.mustache.lua diff --git a/modules/tools/editor/neovim/plugins/config/nvim-tree.lua b/modules/tools/neovim/plugins/config/nvim-tree.lua index cdbef6a..cdbef6a 100644 --- a/modules/tools/editor/neovim/plugins/config/nvim-tree.lua +++ b/modules/tools/neovim/plugins/config/nvim-tree.lua diff --git a/modules/tools/editor/neovim/plugins/config/nvim-ufo.lua b/modules/tools/neovim/plugins/config/nvim-ufo.lua index 641373f..641373f 100644 --- a/modules/tools/editor/neovim/plugins/config/nvim-ufo.lua +++ b/modules/tools/neovim/plugins/config/nvim-ufo.lua diff --git a/modules/tools/editor/neovim/plugins/config/treesitter.nix b/modules/tools/neovim/plugins/config/treesitter.nix index be0bdb6..be0bdb6 100644 --- a/modules/tools/editor/neovim/plugins/config/treesitter.nix +++ b/modules/tools/neovim/plugins/config/treesitter.nix diff --git a/modules/tools/editor/neovim/plugins/config/which-key.lua b/modules/tools/neovim/plugins/config/which-key.lua index 1290432..1290432 100644 --- a/modules/tools/editor/neovim/plugins/config/which-key.lua +++ b/modules/tools/neovim/plugins/config/which-key.lua diff --git a/modules/tools/editor/neovim/plugins/default.nix b/modules/tools/neovim/plugins/default.nix index f801519..b06cb24 100644 --- a/modules/tools/editor/neovim/plugins/default.nix +++ b/modules/tools/neovim/plugins/default.nix @@ -15,7 +15,7 @@ patchPhase = "ln -s ${config.scheme base16-vim} colors/base16-scheme.vim"; })) ] - (if config.tools.editor.neovim.profile == "full" then + (if config.tools.neovim.profile == "full" then [ noice-nvim dressing-nvim diff --git a/modules/tools/nnn/default.nix b/modules/tools/nnn/default.nix new file mode 100644 index 0000000..298f538 --- /dev/null +++ b/modules/tools/nnn/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, lib, ... }: + +{ + options.tools.nnn = { + enable = lib.mkEnableOption "Enables nnn."; + }; + + config = + let + nnnWithNerdIcons = pkgs.nnn.override ({ withNerdIcons = true; }); + in lib.mkIf config.tools.nnn.enable { + programs.nnn.enable = true; + programs.nnn.package = nnnWithNerdIcons; + programs.nnn.plugins.src = "${nnnWithNerdIcons}/share/plugins"; + }; +} diff --git a/modules/tools/system-monitor/default.nix b/modules/tools/system-monitor/default.nix deleted file mode 100644 index a5b569c..0000000 --- a/modules/tools/system-monitor/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./htop - ]; -} diff --git a/modules/tools/terminal/alacritty/default.nix b/modules/tools/terminal/alacritty/default.nix deleted file mode 100644 index fa3c080..0000000 --- a/modules/tools/terminal/alacritty/default.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options.tools.terminal.alacritty = { - enable = lib.mkEnableOption "Enables alacritty."; - }; - - config = lib.mkIf config.tools.terminal.alacritty.enable { - programs.alacritty.enable = true; - tools.terminal.default = lib.mkDefault "alacritty"; - tools.terminal.command = - lib.mkIf - (config.tools.terminal.default == "alacritty") - "${pkgs.alacritty}/bin/alacritty"; - - programs.alacritty.settings = { - window = { - opacity = 1.0; - padding = { - x = config.desktop.window-manager.gap; - y = config.desktop.window-manager.gap; - }; - decorations = "none"; - }; - - font = { - normal = { - family = config.fonts.normal; - style = "Retina"; - }; - bold = { - family = config.fonts.bold; - style = "Bold"; - }; - italic = { - family = config.fonts.italic; - }; - size = config.fonts.size; - }; - - colors = with config.scheme; { - primary = { - background = "0x${base00}"; - foreground = "0x${base05}"; - }; - normal = { - black = "0x${base00}"; - red = "0x${base08}"; - green = "0x${base0B}"; - yellow = "0x${base0A}"; - blue = "0x${base0D}"; - magenta = "0x${base0E}"; - cyan = "0x${base0C}"; - white = "0x${base05}"; - }; - bright = { - black = "0x${base03}"; - red = "0x${base08}"; - green = "0x${base0B}"; - yellow = "0x${base0A}"; - blue = "0x${base0D}"; - magenta = "0x${base0E}"; - cyan = "0x${base0C}"; - white = "0x${base07}"; - }; - dim = { - black = "0x${base01}"; - red = "0x${base08}"; - green = "0x${base0B}"; - yellow = "0x${base0A}"; - blue = "0x${base0D}"; - magenta = "0x${base0E}"; - cyan = "0x${base0C}"; - white = "0x${base04}"; - }; - }; - - shell = { - program = config.shell.command; - }; - }; - }; -} diff --git a/modules/tools/terminal/default.nix b/modules/tools/terminal/default.nix deleted file mode 100644 index 2e29bce..0000000 --- a/modules/tools/terminal/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./alacritty - ./kitty - ./tmux - ]; - - options.tools.terminal = { - command = lib.mkOption { - type = lib.types.str; - description = "Command for the terminal."; - }; - - default = lib.mkOption { - type = lib.types.enum [ - "kitty" - "alacritty" - ]; - description = "Default terminal."; - }; - }; -} diff --git a/modules/tools/terminal/tmux/default.nix b/modules/tools/terminal/tmux/default.nix deleted file mode 100644 index a77bbcb..0000000 --- a/modules/tools/terminal/tmux/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options.tools.terminal.tmux = { - enable = lib.mkEnableOption "Enables tmus."; - }; - - config = lib.mkIf config.tools.terminal.tmux.enable { - programs.tmux.enable = true; - }; -} diff --git a/modules/tools/utils/default.nix b/modules/tools/utils/default.nix deleted file mode 100644 index 5d758fc..0000000 --- a/modules/tools/utils/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./fzf - ]; -} diff --git a/modules/tools/viewer/default.nix b/modules/tools/viewer/default.nix deleted file mode 100644 index 01fd204..0000000 --- a/modules/tools/viewer/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - imports = [ - ./bat - ./feh - ]; -} diff --git a/modules/shell/zsh/default.nix b/modules/tools/zsh/default.nix index 96df967..0f10e72 100644 --- a/modules/shell/zsh/default.nix +++ b/modules/tools/zsh/default.nix @@ -1,23 +1,16 @@ { config, lib, pkgs, ... }: { - options.shell.zsh = { + options.tools.zsh = { enable = lib.mkEnableOption "Enables zsh."; }; - config = lib.mkIf config.shell.zsh.enable { - shell.default = lib.mkDefault "zsh"; - shell.command = - lib.mkIf - (config.shell.default == "zsh") - "${pkgs.zsh}/bin/zsh"; - + config = lib.mkIf config.tools.zsh.enable { programs.zsh.enable = true; programs.zsh.dotDir = ".config/zsh"; programs.zsh.history.path = "${config.xdg.cacheHome}/zsh/history"; - programs.zsh.shellAliases = config.shell.alias; - programs.zsh.initExtra = '' -${if config.tools.utils.fzf.enable then + programs.zsh.initContent = '' +${if config.tools.fzf.enable then "eval \"$(fzf --zsh)\"" else ""} ${builtins.readFile ./zshrc} @@ -25,5 +18,8 @@ ${if config.scripts.enable then "export PATH=${config.home.homeDirectory}/scripts:$PATH" else ""} ''; + programs.kitty.settings.shell = lib.mkIf config.tools.kitty.enable "zsh"; + programs.zsh.shellAliases."nnn" = lib.mkIf config.tools.nnn.enable "nnn -H -d"; + # programs.zsh.shellAliases."ls" = lib.mkIf config.tools.lsd.enable "lsd"; }; } diff --git a/modules/shell/zsh/zshrc b/modules/tools/zsh/zshrc index 3465071..3465071 100644 --- a/modules/shell/zsh/zshrc +++ b/modules/tools/zsh/zshrc |
