aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar@proton.me>2026-03-12 18:48:40 +0530
committerArpit Chakladar <arpitchakladar@proton.me>2026-03-12 18:48:40 +0530
commit51d537e03ad877566f00af3c6a1c00340512ac65 (patch)
tree7f8e1c6fccc68ba2ad7c3a2a02fb6efbc36d37d3
parentd6ccf7e455bd6947664d4a44dfe578813fa2b4eb (diff)
downloadhome-manager-config-51d537e03ad877566f00af3c6a1c00340512ac65.tar.gz
home-manager-config-51d537e03ad877566f00af3c6a1c00340512ac65.zip
Using spaces instead of tabs
-rw-r--r--.editorconfig5
-rw-r--r--flake.lock12
-rw-r--r--flake.nix62
-rw-r--r--modules/default.nix12
-rw-r--r--modules/desktop/bspwm/default.nix72
-rw-r--r--modules/desktop/default.nix50
-rw-r--r--modules/desktop/gtk/default.nix24
-rw-r--r--modules/desktop/polybar/bar/default.nix2
-rw-r--r--modules/desktop/polybar/bar/main.nix66
-rw-r--r--modules/desktop/polybar/default.nix32
-rw-r--r--modules/desktop/polybar/module/battery.nix70
-rw-r--r--modules/desktop/polybar/module/bspwm.nix32
-rw-r--r--modules/desktop/polybar/module/cpu.nix8
-rw-r--r--modules/desktop/polybar/module/date.nix10
-rw-r--r--modules/desktop/polybar/module/default.nix26
-rw-r--r--modules/desktop/polybar/module/ethernet-separator.nix18
-rw-r--r--modules/desktop/polybar/module/ethernet.nix18
-rw-r--r--modules/desktop/polybar/module/memory.nix8
-rw-r--r--modules/desktop/polybar/module/separator.nix4
-rw-r--r--modules/desktop/polybar/module/time.nix10
-rw-r--r--modules/desktop/polybar/module/volume.nix16
-rw-r--r--modules/desktop/polybar/module/wifi-separator.nix18
-rw-r--r--modules/desktop/polybar/module/wifi.nix32
-rw-r--r--modules/desktop/polybar/module/xwindow.nix4
-rw-r--r--modules/desktop/sxhkd/default.nix76
-rw-r--r--modules/desktop/sxhkd/keybindings/brightnessctl.nix20
-rw-r--r--modules/desktop/sxhkd/keybindings/bspwm.nix78
-rw-r--r--modules/desktop/sxhkd/keybindings/maim.nix20
-rw-r--r--modules/desktop/sxhkd/keybindings/pamixer.nix30
-rw-r--r--modules/desktop/sxhkd/keybindings/playerctl.nix10
-rwxr-xr-xmodules/desktop/sxhkd/scripts/keybindings.sh86
-rw-r--r--modules/fonts/default.nix64
-rw-r--r--modules/scripts/default.nix62
-rw-r--r--modules/scripts/system-monitor.sh2
-rw-r--r--modules/scripts/warp-start.sh94
-rw-r--r--modules/scripts/warp-stop.sh90
-rw-r--r--modules/tools/atac/default.nix18
-rw-r--r--modules/tools/bluetui/default.nix18
-rw-r--r--modules/tools/bottles/default.nix22
-rw-r--r--modules/tools/bottom/default.nix14
-rw-r--r--modules/tools/brightnessctl/default.nix18
-rw-r--r--modules/tools/cloudflare-warp/default.nix18
-rw-r--r--modules/tools/default.nix72
-rw-r--r--modules/tools/devenv/default.nix46
-rw-r--r--modules/tools/fastfetch/default.nix18
-rw-r--r--modules/tools/feh/default.nix12
-rw-r--r--modules/tools/fzf/default.nix100
-rw-r--r--modules/tools/git/default.nix62
-rw-r--r--modules/tools/htop/default.nix20
-rw-r--r--modules/tools/impala/default.nix18
-rw-r--r--modules/tools/kitty/default.nix94
-rw-r--r--modules/tools/libreoffice/default.nix18
-rw-r--r--modules/tools/librewolf/default.nix106
-rw-r--r--modules/tools/lsd/default.nix20
-rw-r--r--modules/tools/maim/default.nix18
-rw-r--r--modules/tools/nixvim/colorscheme.nix46
-rw-r--r--modules/tools/nixvim/default.nix174
-rw-r--r--modules/tools/nixvim/keymaps.nix28
-rw-r--r--modules/tools/nixvim/plugins/cmp.nix36
-rw-r--r--modules/tools/nixvim/plugins/comment.nix6
-rw-r--r--modules/tools/nixvim/plugins/default.nix27
-rw-r--r--modules/tools/nixvim/plugins/indent-blankline.nix12
-rw-r--r--modules/tools/nixvim/plugins/lsp.nix95
-rw-r--r--modules/tools/nixvim/plugins/lualine.nix70
-rw-r--r--modules/tools/nixvim/plugins/luasnip.nix6
-rw-r--r--modules/tools/nixvim/plugins/noice.nix28
-rw-r--r--modules/tools/nixvim/plugins/notify.nix6
-rw-r--r--modules/tools/nixvim/plugins/nvim-tree.nix82
-rw-r--r--modules/tools/nixvim/plugins/treesitter.nix20
-rw-r--r--modules/tools/nixvim/plugins/web-devicons.nix6
-rw-r--r--modules/tools/nixvim/plugins/which-key.nix22
-rw-r--r--modules/tools/nnn/default.nix56
-rw-r--r--modules/tools/nvtop/default.nix18
-rw-r--r--modules/tools/pamixer/default.nix18
-rw-r--r--modules/tools/playerctl/default.nix18
-rw-r--r--modules/tools/rofi/default.nix142
-rw-r--r--modules/tools/starship/default.nix127
-rw-r--r--modules/tools/steam/default.nix18
-rw-r--r--modules/tools/systemctl-tui/default.nix18
-rw-r--r--modules/tools/tmux/default.nix14
-rw-r--r--modules/tools/tor-browser/default.nix18
-rw-r--r--modules/tools/unar/default.nix18
-rw-r--r--modules/tools/vlc/default.nix18
-rw-r--r--modules/tools/vscode/default.nix20
-rw-r--r--modules/tools/zathura/default.nix14
-rw-r--r--modules/tools/zsh/default.nix38
-rw-r--r--users/arpit.nix96
87 files changed, 1643 insertions, 1627 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..8ffd4a3
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,5 @@
+root = true
+
+[*.nix]
+indent_style = space
+indent_size = 2
diff --git a/flake.lock b/flake.lock
index 2593013..b339b3a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -62,11 +62,11 @@
]
},
"locked": {
- "lastModified": 1772985285,
- "narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=",
+ "lastModified": 1773286336,
+ "narHash": "sha256-+yFtmhOHterllxWmV6YbdevTXpJdGS0mS0UmJ0k9fh0=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85",
+ "rev": "7d06e0cefe6e4a1e85b2b3274dcb0b3da242a557",
"type": "github"
},
"original": {
@@ -78,11 +78,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1772773019,
- "narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=",
+ "lastModified": 1773122722,
+ "narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "aca4d95fce4914b3892661bcb80b8087293536c6",
+ "rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 049a63a..8186c21 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,35 +1,35 @@
{
- description = "Home Manager configuration of arpit.";
+ description = "Home Manager configuration of arpit.";
- inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
- home-manager = {
- url = "github:nix-community/home-manager/master";
- inputs.nixpkgs.follows = "nixpkgs";
- };
- base16.url = "github:SenchoPens/base16.nix";
- nixvim.url = "github:nix-community/nixvim";
- };
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ home-manager = {
+ url = "github:nix-community/home-manager/master";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ base16.url = "github:SenchoPens/base16.nix";
+ nixvim.url = "github:nix-community/nixvim";
+ };
- outputs = { nixpkgs, home-manager, base16, nixvim, ... }: {
- homeConfigurations = {
- arpit = let
- system = "x86_64-linux";
- pkgs = import nixpkgs {
- inherit system;
- };
- in home-manager.lib.homeManagerConfiguration {
- inherit pkgs;
- modules = [
- ./users/arpit.nix
- ./modules
- base16.homeManagerModule
- {
- scheme = ./assets/onedark-dark.yml;
- }
- nixvim.homeModules.nixvim
- ];
- };
- };
- };
+ outputs = { nixpkgs, home-manager, base16, nixvim, ... }: {
+ homeConfigurations = {
+ arpit = let
+ system = "x86_64-linux";
+ pkgs = import nixpkgs {
+ inherit system;
+ };
+ in home-manager.lib.homeManagerConfiguration {
+ inherit pkgs;
+ modules = [
+ ./users/arpit.nix
+ ./modules
+ base16.homeManagerModule
+ {
+ scheme = ./assets/onedark-dark.yml;
+ }
+ nixvim.homeModules.nixvim
+ ];
+ };
+ };
+ };
}
diff --git a/modules/default.nix b/modules/default.nix
index 86dbd62..9af602b 100644
--- a/modules/default.nix
+++ b/modules/default.nix
@@ -1,10 +1,10 @@
{ ... }:
{
- imports = [
- ./desktop
- ./fonts
- ./scripts
- ./tools
- ];
+ imports = [
+ ./desktop
+ ./fonts
+ ./scripts
+ ./tools
+ ];
}
diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix
index 6b6acef..1248946 100644
--- a/modules/desktop/bspwm/default.nix
+++ b/modules/desktop/bspwm/default.nix
@@ -1,46 +1,46 @@
{ config, lib, pkgs, ... }:
{
- config = lib.mkIf config.desktop.enable {
- xsession.windowManager.bspwm.enable = true;
-
- xsession.windowManager.bspwm.settings = with config.scheme.withHashtag; {
- window_gap = 10;
- 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 = "mod4";
- 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 = ''
+ config = lib.mkIf config.desktop.enable {
+ xsession.windowManager.bspwm.enable = true;
+
+ xsession.windowManager.bspwm.settings = with config.scheme.withHashtag; {
+ window_gap = 10;
+ 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 = "mod4";
+ 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 = ''
for monitor in $(xrandr -q | grep -w 'connected' | cut -d' ' -f1); do
- bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6'
+ bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6'
done
${config.services.polybar.script}
${if config.tools.feh.enable then
- "${pkgs.feh}/bin/feh --bg-scale ${../../../assets/skeleton-mage.png}"
+ "${pkgs.feh}/bin/feh --bg-scale ${../../../assets/skeleton-mage.png}"
else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""}
- '';
- };
+ '';
+ };
}
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index eef9b30..143978c 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -1,32 +1,32 @@
{ lib, config, pkgs, ... }:
{
- imports = [
- ./bspwm
- ./gtk
- ./polybar
- ./sxhkd
- ];
+ imports = [
+ ./bspwm
+ ./gtk
+ ./polybar
+ ./sxhkd
+ ];
- options.desktop = {
- enable = lib.mkEnableOption "Enables graphical interface.";
- };
-
- config = lib.mkIf config.desktop.enable {
- xdg.enable = true;
- xsession.enable = true;
-
- home.file.".xinitrc" = {
- text = ''
-#!/bin/sh
+ options.desktop = {
+ enable = lib.mkEnableOption "Enables graphical interface.";
+ };
-[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
-[ -f ~/.profile ] && . ~/.profile
-[ -f ~/.xsession ] && . ~/.xsession
+ config = lib.mkIf config.desktop.enable {
+ xdg.enable = true;
+ xsession.enable = true;
-exec ${pkgs.bspwm}/bin/bspwm
-'';
- executable = true;
- };
- };
+ home.file.".xinitrc" = {
+ text = ''
+ #!/bin/sh
+
+ [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
+ [ -f ~/.profile ] && . ~/.profile
+ [ -f ~/.xsession ] && . ~/.xsession
+
+ exec ${pkgs.bspwm}/bin/bspwm
+ '';
+ executable = true;
+ };
+ };
}
diff --git a/modules/desktop/gtk/default.nix b/modules/desktop/gtk/default.nix
index f5c5067..3e32a2a 100644
--- a/modules/desktop/gtk/default.nix
+++ b/modules/desktop/gtk/default.nix
@@ -1,16 +1,16 @@
{ config, lib, pkgs, ... }:
{
- config = lib.mkIf config.desktop.enable {
- gtk = {
- enable = true;
- colorScheme = "dark";
- theme = {
- package = pkgs.nightfox-gtk-theme.override {
- tweakVariants = [ "carbonfox" ];
- };
- name = "Nightfox-Dark-Carbonfox";
- };
- };
- };
+ config = lib.mkIf config.desktop.enable {
+ gtk = {
+ enable = true;
+ colorScheme = "dark";
+ theme = {
+ package = pkgs.nightfox-gtk-theme.override {
+ tweakVariants = [ "carbonfox" ];
+ };
+ name = "Nightfox-Dark-Carbonfox";
+ };
+ };
+ };
}
diff --git a/modules/desktop/polybar/bar/default.nix b/modules/desktop/polybar/bar/default.nix
index 23a43c4..9efe672 100644
--- a/modules/desktop/polybar/bar/default.nix
+++ b/modules/desktop/polybar/bar/default.nix
@@ -1,5 +1,5 @@
{ config, lib }:
{
- "bar/main" = import ./main.nix { inherit config lib; };
+ "bar/main" = import ./main.nix { inherit config lib; };
}
diff --git a/modules/desktop/polybar/bar/main.nix b/modules/desktop/polybar/bar/main.nix
index 0f38ae4..d96fe09 100644
--- a/modules/desktop/polybar/bar/main.nix
+++ b/modules/desktop/polybar/bar/main.nix
@@ -2,38 +2,38 @@
with config.scheme.withHashtag;
let
- largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0));
+ largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0));
in {
- width = "100%:-20";
- fixed-center = false;
- height = 35;
- override-redirect = false;
- wm-restack = "bspwm";
- enable-ipc = true;
-
- 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;
-
- offset-x = "10";
- offset-y = "10";
-
- 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 = "bspwm separator";
- modules-center = "xwindow";
- modules-right = "separator volume separator battery separator wifi wifi-separator ethernet ethernet-separator time separator memory separator cpu separator date";
+ width = "100%:-20";
+ fixed-center = false;
+ height = 35;
+ override-redirect = false;
+ wm-restack = "bspwm";
+ enable-ipc = true;
+
+ 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;
+
+ offset-x = "10";
+ offset-y = "10";
+
+ 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 = "bspwm separator";
+ modules-center = "xwindow";
+ modules-right = "separator volume separator battery separator wifi wifi-separator ethernet ethernet-separator time separator memory separator cpu separator date";
}
diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix
index de95a49..ec8d4f5 100644
--- a/modules/desktop/polybar/default.nix
+++ b/modules/desktop/polybar/default.nix
@@ -1,20 +1,20 @@
{ config, lib, pkgs, ... }:
{
- config = lib.mkIf config.desktop.enable {
- services.polybar.enable = true;
- services.polybar.package = (pkgs.polybar.override {
- pulseSupport = true;
- });
- services.polybar.script = "${config.services.polybar.package}/bin/polybar main &";
- services.polybar.config = lib.mkMerge [
- (import ./bar { inherit config lib; })
- (import ./module { inherit config lib; })
- {
- settings = {
- screenchange-reload = true;
- };
- }
- ];
- };
+ config = lib.mkIf config.desktop.enable {
+ services.polybar.enable = true;
+ services.polybar.package = (pkgs.polybar.override {
+ pulseSupport = true;
+ });
+ services.polybar.script = "${config.services.polybar.package}/bin/polybar main &";
+ services.polybar.config = lib.mkMerge [
+ (import ./bar { inherit config lib; })
+ (import ./module { inherit config lib; })
+ {
+ settings = {
+ screenchange-reload = true;
+ };
+ }
+ ];
+ };
}
diff --git a/modules/desktop/polybar/module/battery.nix b/modules/desktop/polybar/module/battery.nix
index cdf3b86..dc9e6f4 100644
--- a/modules/desktop/polybar/module/battery.nix
+++ b/modules/desktop/polybar/module/battery.nix
@@ -2,39 +2,39 @@
with config.scheme.withHashtag;
{
- type = "internal/battery";
- battery = "BAT1";
- adapter = "ADP1";
-
- low-at = 0;
- 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 = "󰁹 ";
-
- label-charging = "%percentage:3%%";
- label-discharging = "%percentage:3%%";
-
- 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;
+ type = "internal/battery";
+ battery = "BAT1";
+ adapter = "ADP1";
+
+ low-at = 0;
+ 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 = "󰁹 ";
+
+ label-charging = "%percentage:3%%";
+ label-discharging = "%percentage:3%%";
+
+ 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/polybar/module/bspwm.nix b/modules/desktop/polybar/module/bspwm.nix
index 3c8f64a..a760acf 100644
--- a/modules/desktop/polybar/module/bspwm.nix
+++ b/modules/desktop/polybar/module/bspwm.nix
@@ -2,20 +2,20 @@
with config.scheme.withHashtag;
{
- type = "internal/bspwm";
-
- label-focused = "%index%";
- label-focused-underline = "${base0D}";
- label-focused-padding = 1;
-
- label-occupied = "%index%";
- label-occupied-padding = 1;
-
- label-urgent = "%index%";
- label-urgent-underline = "${base08}";
- label-urgent-padding = 1;
-
- label-empty = "%index%";
- label-empty-foreground = "${base03}";
- label-empty-padding = 1;
+ type = "internal/bspwm";
+
+ label-focused = "%index%";
+ label-focused-underline = "${base0D}";
+ label-focused-padding = 1;
+
+ label-occupied = "%index%";
+ label-occupied-padding = 1;
+
+ label-urgent = "%index%";
+ label-urgent-underline = "${base08}";
+ label-urgent-padding = 1;
+
+ label-empty = "%index%";
+ label-empty-foreground = "${base03}";
+ label-empty-padding = 1;
}
diff --git a/modules/desktop/polybar/module/cpu.nix b/modules/desktop/polybar/module/cpu.nix
index 754e6eb..64d5b47 100644
--- a/modules/desktop/polybar/module/cpu.nix
+++ b/modules/desktop/polybar/module/cpu.nix
@@ -2,8 +2,8 @@
with config.scheme.withHashtag;
{
- type = "internal/cpu";
- interval = 2;
- format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
- label = "%percentage:3%%";
+ type = "internal/cpu";
+ interval = 2;
+ format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
+ label = "%percentage:3%%";
}
diff --git a/modules/desktop/polybar/module/date.nix b/modules/desktop/polybar/module/date.nix
index 9c56121..0e432e9 100644
--- a/modules/desktop/polybar/module/date.nix
+++ b/modules/desktop/polybar/module/date.nix
@@ -2,9 +2,9 @@
with config.scheme.withHashtag;
{
- type = "internal/date";
- interval = 60;
- date = "%d/%m/%Y";
- label = "%date%";
- format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
+ type = "internal/date";
+ interval = 60;
+ date = "%d/%m/%Y";
+ label = "%date%";
+ format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
}
diff --git a/modules/desktop/polybar/module/default.nix b/modules/desktop/polybar/module/default.nix
index 1a243b0..57854ca 100644
--- a/modules/desktop/polybar/module/default.nix
+++ b/modules/desktop/polybar/module/default.nix
@@ -1,17 +1,17 @@
{ config, lib }:
{
- "module/battery" = import ./battery.nix { inherit config; };
- "module/bspwm" = import ./bspwm.nix { inherit config; };
- "module/cpu" = import ./cpu.nix { inherit config; };
- "module/date" = import ./date.nix { inherit config; };
- "module/ethernet-separator" = import ./ethernet-separator.nix { inherit config; };
- "module/ethernet" = import ./ethernet.nix { inherit config; };
- "module/memory" = import ./memory.nix { inherit config; };
- "module/separator" = import ./separator.nix { inherit config; };
- "module/time" = import ./time.nix { inherit config; };
- "module/volume" = import ./volume.nix { inherit config; };
- "module/wifi-separator" = import ./wifi-separator.nix { inherit config; };
- "module/wifi" = import ./wifi.nix { inherit config; };
- "module/xwindow" = import ./xwindow.nix { inherit config; };
+ "module/battery" = import ./battery.nix { inherit config; };
+ "module/bspwm" = import ./bspwm.nix { inherit config; };
+ "module/cpu" = import ./cpu.nix { inherit config; };
+ "module/date" = import ./date.nix { inherit config; };
+ "module/ethernet-separator" = import ./ethernet-separator.nix { inherit config; };
+ "module/ethernet" = import ./ethernet.nix { inherit config; };
+ "module/memory" = import ./memory.nix { inherit config; };
+ "module/separator" = import ./separator.nix { inherit config; };
+ "module/time" = import ./time.nix { inherit config; };
+ "module/volume" = import ./volume.nix { inherit config; };
+ "module/wifi-separator" = import ./wifi-separator.nix { inherit config; };
+ "module/wifi" = import ./wifi.nix { inherit config; };
+ "module/xwindow" = import ./xwindow.nix { inherit config; };
}
diff --git a/modules/desktop/polybar/module/ethernet-separator.nix b/modules/desktop/polybar/module/ethernet-separator.nix
index c2fefaa..2c2a738 100644
--- a/modules/desktop/polybar/module/ethernet-separator.nix
+++ b/modules/desktop/polybar/module/ethernet-separator.nix
@@ -2,13 +2,13 @@
with config.scheme.withHashtag;
{
- type = "internal/network";
- interface = "enp4s0";
- interface-type = "wired";
-
- format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
- format-disconnected = "";
-
- label-connected = "";
- label-disconnected = "";
+ type = "internal/network";
+ interface = "enp4s0";
+ interface-type = "wired";
+
+ format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
+ format-disconnected = "";
+
+ label-connected = "";
+ label-disconnected = "";
}
diff --git a/modules/desktop/polybar/module/ethernet.nix b/modules/desktop/polybar/module/ethernet.nix
index 3e2b48d..28c7a1b 100644
--- a/modules/desktop/polybar/module/ethernet.nix
+++ b/modules/desktop/polybar/module/ethernet.nix
@@ -2,13 +2,13 @@
with config.scheme.withHashtag;
{
- type = "internal/network";
- interface = "enp4s0";
- interface-type = "wired";
-
- format-connected = "%{T2}%{F${base03}}%{F-}%{T-} <label-connected>";
- format-disconnected = "";
-
- label-connected = "%netspeed:8%";
- label-disconnected = "";
+ type = "internal/network";
+ interface = "enp4s0";
+ interface-type = "wired";
+
+ format-connected = "%{T2}%{F${base03}}%{F-}%{T-} <label-connected>";
+ format-disconnected = "";
+
+ label-connected = "%netspeed:8%";
+ label-disconnected = "";
}
diff --git a/modules/desktop/polybar/module/memory.nix b/modules/desktop/polybar/module/memory.nix
index d6ab597..7f8de0a 100644
--- a/modules/desktop/polybar/module/memory.nix
+++ b/modules/desktop/polybar/module/memory.nix
@@ -2,8 +2,8 @@
with config.scheme.withHashtag;
{
- type = "internal/memory";
- interval = 2;
- format-prefix = "%{T2}%{F${base03}} %{F-}%{T-} ";
- label = "%gb_used:9%";
+ type = "internal/memory";
+ interval = 2;
+ format-prefix = "%{T2}%{F${base03}} %{F-}%{T-} ";
+ label = "%gb_used:9%";
}
diff --git a/modules/desktop/polybar/module/separator.nix b/modules/desktop/polybar/module/separator.nix
index 1434037..0a75a30 100644
--- a/modules/desktop/polybar/module/separator.nix
+++ b/modules/desktop/polybar/module/separator.nix
@@ -2,6 +2,6 @@
with config.scheme.withHashtag;
{
- type = "custom/text";
- label = " %{F${base03}}%{T3}│%{T-}%{F-} ";
+ type = "custom/text";
+ label = " %{F${base03}}%{T3}│%{T-}%{F-} ";
}
diff --git a/modules/desktop/polybar/module/time.nix b/modules/desktop/polybar/module/time.nix
index 2179c09..6fe921d 100644
--- a/modules/desktop/polybar/module/time.nix
+++ b/modules/desktop/polybar/module/time.nix
@@ -2,9 +2,9 @@
with config.scheme.withHashtag;
{
- type = "internal/date";
- interval = 30;
- time = "%I:%M %p";
- label = "%time%";
- format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
+ type = "internal/date";
+ interval = 30;
+ time = "%I:%M %p";
+ label = "%time%";
+ format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
}
diff --git a/modules/desktop/polybar/module/volume.nix b/modules/desktop/polybar/module/volume.nix
index 4dff8fb..eacd53d 100644
--- a/modules/desktop/polybar/module/volume.nix
+++ b/modules/desktop/polybar/module/volume.nix
@@ -2,12 +2,12 @@
with config.scheme.withHashtag;
{
- type = "internal/pulseaudio";
- interval = 5;
- format-volume = "%{T2}%{F${base03}}<ramp-volume>%{F-}%{T-} <label-volume>";
- label-volume = "%percentage:3%%";
- label-muted = "%{T2}%{F${base03}} %{F-}%{T-} ";
- ramp-volume-0 = " ";
- ramp-volume-1 = " ";
- ramp-volume-2 = " ";
+ type = "internal/pulseaudio";
+ interval = 5;
+ format-volume = "%{T2}%{F${base03}}<ramp-volume>%{F-}%{T-} <label-volume>";
+ label-volume = "%percentage:3%%";
+ label-muted = "%{T2}%{F${base03}} %{F-}%{T-} ";
+ ramp-volume-0 = " ";
+ ramp-volume-1 = " ";
+ ramp-volume-2 = " ";
}
diff --git a/modules/desktop/polybar/module/wifi-separator.nix b/modules/desktop/polybar/module/wifi-separator.nix
index 6b8da50..2527b68 100644
--- a/modules/desktop/polybar/module/wifi-separator.nix
+++ b/modules/desktop/polybar/module/wifi-separator.nix
@@ -2,13 +2,13 @@
with config.scheme.withHashtag;
{
- type = "internal/network";
- interface = "wlan0";
- interface-type = "wireless";
-
- format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
- format-disconnected = "";
-
- label-connected = "";
- label-disconnected = "";
+ type = "internal/network";
+ interface = "wlan0";
+ interface-type = "wireless";
+
+ format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
+ format-disconnected = "";
+
+ label-connected = "";
+ label-disconnected = "";
}
diff --git a/modules/desktop/polybar/module/wifi.nix b/modules/desktop/polybar/module/wifi.nix
index 9f25fa2..5a4d17f 100644
--- a/modules/desktop/polybar/module/wifi.nix
+++ b/modules/desktop/polybar/module/wifi.nix
@@ -2,20 +2,20 @@
with config.scheme.withHashtag;
{
- type = "internal/network";
- interface = "wlan0";
- interface-type = "wireless";
-
- format-connected = "%{T2}%{F${base03}}<ramp-signal>%{F-}%{T-} <label-connected>";
- format-disconnected = "";
-
- label-connected = "%netspeed:8%";
- label-disconnected = "";
-
- ramp-signal-0 = "󰢼";
- ramp-signal-1 = "󰢼";
- ramp-signal-2 = "󰢽";
- ramp-signal-3 = "󰢽";
- ramp-signal-4 = "󰢾";
- ramp-signal-5 = "󰢾";
+ type = "internal/network";
+ interface = "wlan0";
+ interface-type = "wireless";
+
+ format-connected = "%{T2}%{F${base03}}<ramp-signal>%{F-}%{T-} <label-connected>";
+ format-disconnected = "";
+
+ label-connected = "%netspeed:8%";
+ label-disconnected = "";
+
+ ramp-signal-0 = "󰢼";
+ ramp-signal-1 = "󰢼";
+ ramp-signal-2 = "󰢽";
+ ramp-signal-3 = "󰢽";
+ ramp-signal-4 = "󰢾";
+ ramp-signal-5 = "󰢾";
}
diff --git a/modules/desktop/polybar/module/xwindow.nix b/modules/desktop/polybar/module/xwindow.nix
index 386efe2..16574f5 100644
--- a/modules/desktop/polybar/module/xwindow.nix
+++ b/modules/desktop/polybar/module/xwindow.nix
@@ -1,6 +1,6 @@
{ config }:
{
- type = "internal/xwindow";
- label = "%title:0:20:...%";
+ type = "internal/xwindow";
+ label = "%title:0:20:...%";
}
diff --git a/modules/desktop/sxhkd/default.nix b/modules/desktop/sxhkd/default.nix
index 3102efe..19bc540 100644
--- a/modules/desktop/sxhkd/default.nix
+++ b/modules/desktop/sxhkd/default.nix
@@ -1,42 +1,42 @@
{ pkgs, config, lib, ... }:
{
- config = lib.mkIf config.desktop.enable {
- services.sxhkd.enable = true;
- services.sxhkd.keybindings =
- let
- modKey = "super";
- createKeybinding = keybinding: createKeybindingBase "${modKey} + ${keybinding}";
- createKeybindingBase = keybinding: description: command: {
- "# ${description}\n${keybinding}" = command;
- };
- in lib.mkMerge [
- (import ./keybindings/brightnessctl.nix { inherit pkgs createKeybindingBase lib; })
- (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; })
- (import ./keybindings/maim.nix { inherit pkgs createKeybinding lib; })
- (import ./keybindings/pamixer.nix { inherit pkgs createKeybindingBase lib; })
- (import ./keybindings/playerctl.nix { inherit pkgs createKeybindingBase lib; })
-
- (createKeybinding
- "s"
- "Show keybindings."
- "kitty --title 'Keybindings' --class floating-termial -e ${pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh)}"
- )
-
- (createKeybinding
- "r"
- "Application launcher."
- "rofi -show drun")
-
- (createKeybinding
- "t"
- "Launch terminal."
- "kitty")
-
- (createKeybinding
- "f"
- "Launch File Manager."
- "kitty --title 'File Manager' --class floating-termial -e nnn")
- ];
- };
+ config = lib.mkIf config.desktop.enable {
+ services.sxhkd.enable = true;
+ services.sxhkd.keybindings =
+ let
+ modKey = "super";
+ createKeybinding = keybinding: createKeybindingBase "${modKey} + ${keybinding}";
+ createKeybindingBase = keybinding: description: command: {
+ "# ${description}\n${keybinding}" = command;
+ };
+ in lib.mkMerge [
+ (import ./keybindings/brightnessctl.nix { inherit pkgs createKeybindingBase lib; })
+ (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; })
+ (import ./keybindings/maim.nix { inherit pkgs createKeybinding lib; })
+ (import ./keybindings/pamixer.nix { inherit pkgs createKeybindingBase lib; })
+ (import ./keybindings/playerctl.nix { inherit pkgs createKeybindingBase lib; })
+
+ (createKeybinding
+ "s"
+ "Show keybindings."
+ "kitty --title 'Keybindings' --class floating-termial -e ${pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh)}"
+ )
+
+ (createKeybinding
+ "r"
+ "Application launcher."
+ "rofi -show drun")
+
+ (createKeybinding
+ "t"
+ "Launch terminal."
+ "kitty")
+
+ (createKeybinding
+ "f"
+ "Launch File Manager."
+ "kitty --title 'File Manager' --class floating-termial -e nnn")
+ ];
+ };
}
diff --git a/modules/desktop/sxhkd/keybindings/brightnessctl.nix b/modules/desktop/sxhkd/keybindings/brightnessctl.nix
index 6cdf3e7..bc508e6 100644
--- a/modules/desktop/sxhkd/keybindings/brightnessctl.nix
+++ b/modules/desktop/sxhkd/keybindings/brightnessctl.nix
@@ -1,15 +1,15 @@
{ createKeybindingBase, pkgs, lib }:
let
- brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
+ brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
in lib.mkMerge [
- (createKeybindingBase
- "XF86MonBrightnessDown"
- "Decrease brightness."
- "${brightnessctl} set 5%-")
-
- (createKeybindingBase
- "XF86MonBrightnessUp"
- "Increase brightness."
- "${brightnessctl} set +5%")
+ (createKeybindingBase
+ "XF86MonBrightnessDown"
+ "Decrease brightness."
+ "${brightnessctl} set 5%-")
+
+ (createKeybindingBase
+ "XF86MonBrightnessUp"
+ "Increase brightness."
+ "${brightnessctl} set +5%")
]
diff --git a/modules/desktop/sxhkd/keybindings/bspwm.nix b/modules/desktop/sxhkd/keybindings/bspwm.nix
index ffa7d6c..cd838a3 100644
--- a/modules/desktop/sxhkd/keybindings/bspwm.nix
+++ b/modules/desktop/sxhkd/keybindings/bspwm.nix
@@ -1,45 +1,45 @@
{ createKeybinding, pkgs, lib }:
let
- bspc = "${pkgs.bspwm}/bin/bspc";
+ 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}
+ (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/sxhkd/keybindings/maim.nix b/modules/desktop/sxhkd/keybindings/maim.nix
index b66ec98..2092a71 100644
--- a/modules/desktop/sxhkd/keybindings/maim.nix
+++ b/modules/desktop/sxhkd/keybindings/maim.nix
@@ -1,15 +1,15 @@
{ createKeybinding, pkgs, lib }:
let
- maim = "${pkgs.maim}/bin/maim";
+ maim = "${pkgs.maim}/bin/maim";
in lib.mkMerge [
- (createKeybinding
- "p"
- "Take screenshot of selected area and save to clipboard"
- "${maim} -s | xclip -selection clipboard -t image/png")
-
- (createKeybinding
- "shift + p"
- "Take screenshot of selected area and save to ~/Pictures/Screenshots"
- "mkdir -p ~/Pictures/Screenshots && ${maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png")
+ (createKeybinding
+ "p"
+ "Take screenshot of selected area and save to clipboard"
+ "${maim} -s | xclip -selection clipboard -t image/png")
+
+ (createKeybinding
+ "shift + p"
+ "Take screenshot of selected area and save to ~/Pictures/Screenshots"
+ "mkdir -p ~/Pictures/Screenshots && ${maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png")
]
diff --git a/modules/desktop/sxhkd/keybindings/pamixer.nix b/modules/desktop/sxhkd/keybindings/pamixer.nix
index a45bf83..e7f056e 100644
--- a/modules/desktop/sxhkd/keybindings/pamixer.nix
+++ b/modules/desktop/sxhkd/keybindings/pamixer.nix
@@ -1,20 +1,20 @@
{ createKeybindingBase, pkgs, lib }:
let
- pamixer = "${pkgs.pamixer}/bin/pamixer";
+ pamixer = "${pkgs.pamixer}/bin/pamixer";
in lib.mkMerge [
- (createKeybindingBase
- "XF86AudioLowerVolume"
- "Decrease volume."
- "${pamixer} --decrease 5")
-
- (createKeybindingBase
- "XF86AudioRaiseVolume"
- "Increase volume."
- "${pamixer} --increase 5")
-
- (createKeybindingBase
- "XF86AudioMute"
- "Mute audio."
- "${pamixer} --toggle-mute")
+ (createKeybindingBase
+ "XF86AudioLowerVolume"
+ "Decrease volume."
+ "${pamixer} --decrease 5")
+
+ (createKeybindingBase
+ "XF86AudioRaiseVolume"
+ "Increase volume."
+ "${pamixer} --increase 5")
+
+ (createKeybindingBase
+ "XF86AudioMute"
+ "Mute audio."
+ "${pamixer} --toggle-mute")
]
diff --git a/modules/desktop/sxhkd/keybindings/playerctl.nix b/modules/desktop/sxhkd/keybindings/playerctl.nix
index 3e5c4e0..7c3b796 100644
--- a/modules/desktop/sxhkd/keybindings/playerctl.nix
+++ b/modules/desktop/sxhkd/keybindings/playerctl.nix
@@ -1,10 +1,10 @@
{ createKeybindingBase, pkgs, lib }:
let
- playerctl = "${pkgs.playerctl}/bin/playerctl";
+ playerctl = "${pkgs.playerctl}/bin/playerctl";
in lib.mkMerge [
- (createKeybindingBase
- "XF86AudioPlay"
- "Toggle video / audio player."
- "${playerctl} play-pause")
+ (createKeybindingBase
+ "XF86AudioPlay"
+ "Toggle video / audio player."
+ "${playerctl} play-pause")
]
diff --git a/modules/desktop/sxhkd/scripts/keybindings.sh b/modules/desktop/sxhkd/scripts/keybindings.sh
index 1548f1c..e713415 100755
--- a/modules/desktop/sxhkd/scripts/keybindings.sh
+++ b/modules/desktop/sxhkd/scripts/keybindings.sh
@@ -5,9 +5,9 @@ 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"
+ local text="$1"
+ local width="$2"
+ echo "$text" | fold -s -w "$width"
}
# Get terminal width
@@ -33,44 +33,44 @@ border_line="├$(printf '%.0s─' $(seq 1 $max_keybinding_length))┼$(printf '
# 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"
-
- 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))┘"
+ # 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"
+
+ 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/fonts/default.nix b/modules/fonts/default.nix
index e6c9acb..4bd664f 100644
--- a/modules/fonts/default.nix
+++ b/modules/fonts/default.nix
@@ -1,36 +1,36 @@
{ lib, config, pkgs, ... }:
{
- options.fonts = {
- normal = lib.mkOption {
- type = lib.types.str;
- description = "Default normal font name.";
- };
-
- bold = lib.mkOption {
- type = lib.types.str;
- description = "Default bold font name.";
- default = config.fonts.normal;
- };
-
- italic = lib.mkOption {
- type = lib.types.str;
- description = "Default italic font name.";
- default = config.fonts.normal;
- };
-
- size = lib.mkOption {
- type = lib.types.int;
- description = "Default font size.";
- default = 16;
- };
- };
-
- config = {
- fonts.normal = lib.mkDefault "Fira Code Nerd Font";
-
- home.packages = with pkgs; [
- nerd-fonts.fira-code
- ];
- };
+ options.fonts = {
+ normal = lib.mkOption {
+ type = lib.types.str;
+ description = "Default normal font name.";
+ };
+
+ bold = lib.mkOption {
+ type = lib.types.str;
+ description = "Default bold font name.";
+ default = config.fonts.normal;
+ };
+
+ italic = lib.mkOption {
+ type = lib.types.str;
+ description = "Default italic font name.";
+ default = config.fonts.normal;
+ };
+
+ size = lib.mkOption {
+ type = lib.types.int;
+ description = "Default font size.";
+ default = 16;
+ };
+ };
+
+ config = {
+ fonts.normal = lib.mkDefault "Fira Code Nerd Font";
+
+ home.packages = with pkgs; [
+ nerd-fonts.fira-code
+ ];
+ };
}
diff --git a/modules/scripts/default.nix b/modules/scripts/default.nix
index 21b8399..c90703c 100644
--- a/modules/scripts/default.nix
+++ b/modules/scripts/default.nix
@@ -1,35 +1,35 @@
{ config, lib, pkgs, ... }:
{
- config = {
- home.sessionPath = [
- "${config.home.homeDirectory}/scripts"
- ];
-
- home.file = let
- shellScript = path: {
- text = ''
-#!${pkgs.bash}/bin/bash
-${builtins.readFile path}
-'';
- executable = true;
- };
- in {
- "scripts/system-monitor" =
- lib.mkIf
- (config.tools.bottom.enable &&
- config.tools.nvtop.enable &&
- config.tools.tmux.enable &&
- config.tools.kitty.enable)
- (shellScript ./system-monitor.sh);
- "scripts/warp-start" =
- lib.mkIf
- config.tools.cloudflare-warp.enable
- (shellScript ./warp-start.sh);
- "scripts/warp-stop" =
- lib.mkIf
- config.tools.cloudflare-warp.enable
- (shellScript ./warp-stop.sh);
- };
- };
+ config = {
+ home.sessionPath = [
+ "${config.home.homeDirectory}/scripts"
+ ];
+
+ home.file = let
+ shellScript = path: {
+ text = ''
+ #!${pkgs.bash}/bin/bash
+ ${builtins.readFile path}
+ '';
+ executable = true;
+ };
+ in {
+ "scripts/system-monitor" =
+ lib.mkIf
+ (config.tools.bottom.enable &&
+ config.tools.nvtop.enable &&
+ config.tools.tmux.enable &&
+ config.tools.kitty.enable)
+ (shellScript ./system-monitor.sh);
+ "scripts/warp-start" =
+ lib.mkIf
+ config.tools.cloudflare-warp.enable
+ (shellScript ./warp-start.sh);
+ "scripts/warp-stop" =
+ lib.mkIf
+ config.tools.cloudflare-warp.enable
+ (shellScript ./warp-stop.sh);
+ };
+ };
}
diff --git a/modules/scripts/system-monitor.sh b/modules/scripts/system-monitor.sh
index fed9ce9..951428c 100644
--- a/modules/scripts/system-monitor.sh
+++ b/modules/scripts/system-monitor.sh
@@ -3,7 +3,7 @@ SESSION="system-monitor"
kitty @ set-font-size -- -4
cleanup() {
- kitty @ set-font-size -- +4
+ kitty @ set-font-size -- +4
}
trap cleanup EXIT INT TERM
diff --git a/modules/scripts/warp-start.sh b/modules/scripts/warp-start.sh
index a1f3c76..bafbe84 100644
--- a/modules/scripts/warp-start.sh
+++ b/modules/scripts/warp-start.sh
@@ -4,68 +4,68 @@ LOGFILE="/var/log/warp-svc.log"
DAEMON_TIMEOUT=30 # seconds
start_daemon() {
- if ! pgrep -x warp-svc >/dev/null 2>&1; then
- echo "Starting warp-svc daemon..."
- sudo nohup warp-svc >>"$LOGFILE" 2>&1 &
- else
- echo "warp-svc already running."
- fi
+ if ! pgrep -x warp-svc >/dev/null 2>&1; then
+ echo "Starting warp-svc daemon..."
+ sudo nohup warp-svc >>"$LOGFILE" 2>&1 &
+ else
+ echo "warp-svc already running."
+ fi
}
wait_for_daemon() {
- echo "Waiting for warp-svc to become ready..."
- for ((i=1; i<=DAEMON_TIMEOUT; i++)); do
- if warp-cli status >/dev/null 2>&1; then
- echo "warp-svc is ready."
- return 0
- fi
- sleep 1
- done
-
- echo "ERROR: warp-svc did not become ready within ${DAEMON_TIMEOUT}s" >&2
- exit 1
+ echo "Waiting for warp-svc to become ready..."
+ for ((i=1; i<=DAEMON_TIMEOUT; i++)); do
+ if warp-cli status >/dev/null 2>&1; then
+ echo "warp-svc is ready."
+ return 0
+ fi
+ sleep 1
+ done
+
+ echo "ERROR: warp-svc did not become ready within ${DAEMON_TIMEOUT}s" >&2
+ exit 1
}
is_registered() {
- if warp-cli status 2>&1 | grep -qi "Registration missing"; then
- return 1
- fi
- return 0
+ if warp-cli status 2>&1 | grep -qi "Registration missing"; then
+ return 1
+ fi
+ return 0
}
register_client() {
- echo "Registering client..."
- sudo warp-cli registration new
+ echo "Registering client..."
+ sudo warp-cli registration new
}
connect_client() {
- echo "Connecting to WARP..."
- sudo warp-cli connect
+ echo "Connecting to WARP..."
+ sudo warp-cli connect
}
main() {
- [[ "${EUID:-$(id -u)}" -eq 0 ]] || {
- if [[ -t 2 ]]; then
- echo -e "\e[31mERROR:\e[0m Must be run as root" >&2
- else
- echo "ERROR: Must be run as root" >&2
- fi
- exit 1
- }
-
- start_daemon
- wait_for_daemon
-
- if ! is_registered; then
- register_client
- else
- echo "Client already registered."
- fi
-
- connect_client
-
- echo "Current status:"
- warp-cli status
+ [[ "${EUID:-$(id -u)}" -eq 0 ]] || {
+ if [[ -t 2 ]]; then
+ echo -e "\e[31mERROR:\e[0m Must be run as root" >&2
+ else
+ echo "ERROR: Must be run as root" >&2
+ fi
+ exit 1
+ }
+
+ start_daemon
+ wait_for_daemon
+
+ if ! is_registered; then
+ register_client
+ else
+ echo "Client already registered."
+ fi
+
+ connect_client
+
+ echo "Current status:"
+ warp-cli status
}
main
diff --git a/modules/scripts/warp-stop.sh b/modules/scripts/warp-stop.sh
index 9fdf238..95fdc7e 100644
--- a/modules/scripts/warp-stop.sh
+++ b/modules/scripts/warp-stop.sh
@@ -1,57 +1,57 @@
set -euo pipefail
stop_daemon() {
- echo "Stopping warp-svc process..."
-
- if pgrep -x warp-svc >/dev/null 2>&1; then
- sudo pkill -x warp-svc
- else
- echo "warp-svc is not running."
- return 0
- fi
-
- echo "Waiting for warp-svc to stop..."
- for _ in {1..30}; do
- if ! pgrep -x warp-svc >/dev/null 2>&1; then
- echo "warp-svc stopped."
- return 0
- fi
- sleep 1
- done
-
- echo "ERROR: warp-svc did not stop in time" >&2
- exit 1
+ echo "Stopping warp-svc process..."
+
+ if pgrep -x warp-svc >/dev/null 2>&1; then
+ sudo pkill -x warp-svc
+ else
+ echo "warp-svc is not running."
+ return 0
+ fi
+
+ echo "Waiting for warp-svc to stop..."
+ for _ in {1..30}; do
+ if ! pgrep -x warp-svc >/dev/null 2>&1; then
+ echo "warp-svc stopped."
+ return 0
+ fi
+ sleep 1
+ done
+
+ echo "ERROR: warp-svc did not stop in time" >&2
+ exit 1
}
disconnect_client() {
- echo "Disconnecting from WARP..."
- if warp-cli status 2>&1 | grep -qi "Connected"; then
- sudo warp-cli disconnect
- echo "Disconnected."
- else
- echo "WARP is already disconnected."
- fi
+ echo "Disconnecting from WARP..."
+ if warp-cli status 2>&1 | grep -qi "Connected"; then
+ sudo warp-cli disconnect
+ echo "Disconnected."
+ else
+ echo "WARP is already disconnected."
+ fi
}
main() {
- [[ "${EUID:-$(id -u)}" -eq 0 ]] || {
- if [[ -t 2 ]]; then
- echo -e "\e[31mERROR:\e[0m Must be run as root" >&2
- else
- echo "ERROR: Must be run as root" >&2
- fi
- exit 1
- }
-
- disconnect_client
- stop_daemon
-
- echo "Final status:"
- warp-cli status || true
-
- echo "Flushing DNS and restarting systemd-resolved..."
- sudo systemd-resolve --flush-caches
- sudo systemctl restart systemd-resolved
+ [[ "${EUID:-$(id -u)}" -eq 0 ]] || {
+ if [[ -t 2 ]]; then
+ echo -e "\e[31mERROR:\e[0m Must be run as root" >&2
+ else
+ echo "ERROR: Must be run as root" >&2
+ fi
+ exit 1
+ }
+
+ disconnect_client
+ stop_daemon
+
+ echo "Final status:"
+ warp-cli status || true
+
+ echo "Flushing DNS and restarting systemd-resolved..."
+ sudo systemd-resolve --flush-caches
+ sudo systemctl restart systemd-resolved
}
main "$@"
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";
+ };
}
diff --git a/users/arpit.nix b/users/arpit.nix
index c1e6d60..ff4c20e 100644
--- a/users/arpit.nix
+++ b/users/arpit.nix
@@ -1,52 +1,52 @@
{ config, ... }:
{
- nixpkgs.config.allowUnfree = true;
-
- home.username = "arpit";
- home.homeDirectory = "/home/${config.home.username}";
- home.stateVersion = "25.05";
-
- # Desktop environment
- desktop.enable = true;
-
- # Tools
- tools.atac.enable = true;
- tools.bluetui.enable = true;
- tools.bottles.enable = true;
- tools.bottom.enable = true;
- tools.brightnessctl.enable = true;
- tools.cloudflare-warp.enable = true;
- tools.devenv.enable = true;
- tools.fastfetch.enable = true;
- tools.feh.enable = true;
- tools.fzf.enable = true;
- tools.git.enable = true;
- tools.git.username = "Arpit Chakladar";
- tools.git.email = "arpitchakladar@proton.me";
- tools.htop.enable = true;
- tools.impala.enable = true;
- tools.kitty.enable = true;
- tools.libreoffice.enable = true;
- tools.librewolf.enable = true;
- tools.lsd.enable = true;
- tools.maim.enable = true;
- tools.nixvim.enable = true;
- tools.nnn.enable = true;
- tools.nvtop.enable = true;
- tools.pamixer.enable = true;
- tools.playerctl.enable = true;
- tools.rofi.enable = true;
- tools.starship.enable = true;
- tools.steam.enable = true;
- tools.systemctl-tui.enable = true;
- tools.tmux.enable = true;
- tools.tor-browser.enable = true;
- tools.unar.enable = true;
- tools.vlc.enable = true;
- tools.vscode.enable = true;
- tools.zathura.enable = true;
- tools.zsh.enable = true;
-
- programs.home-manager.enable = true;
+ nixpkgs.config.allowUnfree = true;
+
+ home.username = "arpit";
+ home.homeDirectory = "/home/${config.home.username}";
+ home.stateVersion = "25.05";
+
+ # Desktop environment
+ desktop.enable = true;
+
+ # Tools
+ tools.atac.enable = true;
+ tools.bluetui.enable = true;
+ tools.bottles.enable = true;
+ tools.bottom.enable = true;
+ tools.brightnessctl.enable = true;
+ tools.cloudflare-warp.enable = true;
+ tools.devenv.enable = true;
+ tools.fastfetch.enable = true;
+ tools.feh.enable = true;
+ tools.fzf.enable = true;
+ tools.git.enable = true;
+ tools.git.username = "Arpit Chakladar";
+ tools.git.email = "arpitchakladar@proton.me";
+ tools.htop.enable = true;
+ tools.impala.enable = true;
+ tools.kitty.enable = true;
+ tools.libreoffice.enable = true;
+ tools.librewolf.enable = true;
+ tools.lsd.enable = true;
+ tools.maim.enable = true;
+ tools.nixvim.enable = true;
+ tools.nnn.enable = true;
+ tools.nvtop.enable = true;
+ tools.pamixer.enable = true;
+ tools.playerctl.enable = true;
+ tools.rofi.enable = true;
+ tools.starship.enable = true;
+ tools.steam.enable = true;
+ tools.systemctl-tui.enable = true;
+ tools.tmux.enable = true;
+ tools.tor-browser.enable = true;
+ tools.unar.enable = true;
+ tools.vlc.enable = true;
+ tools.vscode.enable = true;
+ tools.zathura.enable = true;
+ tools.zsh.enable = true;
+
+ programs.home-manager.enable = true;
}