aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/desktop/bspwm/default.nix24
-rw-r--r--modules/desktop/default.nix7
-rw-r--r--modules/desktop/gtk/default.nix7
-rw-r--r--modules/desktop/polybar/bar/main.nix3
-rw-r--r--modules/desktop/polybar/default.nix15
-rw-r--r--modules/desktop/sxhkd/default.nix57
-rw-r--r--modules/desktop/sxhkd/keybindings/brightnessctl.nix19
-rw-r--r--modules/desktop/sxhkd/keybindings/bspwm.nix61
-rw-r--r--modules/desktop/sxhkd/keybindings/maim.nix23
-rw-r--r--modules/desktop/sxhkd/keybindings/pamixer.nix24
-rw-r--r--modules/desktop/sxhkd/keybindings/playerctl.nix14
-rw-r--r--modules/fonts/default.nix7
-rw-r--r--modules/scripts/default.nix52
-rw-r--r--modules/tools/atac/default.nix7
-rw-r--r--modules/tools/bluetui/default.nix7
-rw-r--r--modules/tools/bottles/default.nix7
-rw-r--r--modules/tools/brightnessctl/default.nix7
-rw-r--r--modules/tools/cloudflare-warp/default.nix7
-rw-r--r--modules/tools/devenv/default.nix29
-rw-r--r--modules/tools/fzf/default.nix92
-rw-r--r--modules/tools/git/default.nix7
-rw-r--r--modules/tools/htop/default.nix7
-rw-r--r--modules/tools/impala/default.nix7
-rw-r--r--modules/tools/libreoffice/default.nix7
-rw-r--r--modules/tools/librewolf/default.nix7
-rw-r--r--modules/tools/maim/default.nix7
-rw-r--r--modules/tools/nixvim/default.nix3
-rw-r--r--modules/tools/nixvim/keymaps.nix30
-rw-r--r--modules/tools/nixvim/plugins/lualine.nix80
-rw-r--r--modules/tools/nixvim/plugins/nvim-tree.nix2
-rw-r--r--modules/tools/nixvim/plugins/treesitter.nix8
-rw-r--r--modules/tools/nixvim/plugins/which-key.nix9
-rw-r--r--modules/tools/nnn/default.nix7
-rw-r--r--modules/tools/nvtop/default.nix7
-rw-r--r--modules/tools/pamixer/default.nix7
-rw-r--r--modules/tools/playerctl/default.nix7
-rw-r--r--modules/tools/rofi/default.nix107
-rw-r--r--modules/tools/starship/default.nix83
-rw-r--r--modules/tools/steam/default.nix7
-rw-r--r--modules/tools/systemctl-tui/default.nix7
-rw-r--r--modules/tools/tor-browser/default.nix7
-rw-r--r--modules/tools/unar/default.nix7
-rw-r--r--modules/tools/vlc/default.nix7
-rw-r--r--modules/tools/vscode/default.nix7
-rw-r--r--modules/tools/zsh/default.nix41
45 files changed, 576 insertions, 368 deletions
diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix
index 1248946..19fdf2a 100644
--- a/modules/desktop/bspwm/default.nix
+++ b/modules/desktop/bspwm/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
config = lib.mkIf config.desktop.enable {
@@ -33,14 +38,17 @@
};
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'
-done
+ for monitor in $(xrandr -q | grep -w 'connected' | cut -d' ' -f1); do
+ 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}"
-else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""}
+ ${config.services.polybar.script}
+ ${
+ if config.tools.feh.enable then
+ "${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 143978c..2856d45 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -1,4 +1,9 @@
-{ lib, config, pkgs, ... }:
+{
+ lib,
+ config,
+ pkgs,
+ ...
+}:
{
imports = [
diff --git a/modules/desktop/gtk/default.nix b/modules/desktop/gtk/default.nix
index 3e32a2a..5147bf5 100644
--- a/modules/desktop/gtk/default.nix
+++ b/modules/desktop/gtk/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
config = lib.mkIf config.desktop.enable {
diff --git a/modules/desktop/polybar/bar/main.nix b/modules/desktop/polybar/bar/main.nix
index d96fe09..8b52fab 100644
--- a/modules/desktop/polybar/bar/main.nix
+++ b/modules/desktop/polybar/bar/main.nix
@@ -3,7 +3,8 @@
with config.scheme.withHashtag;
let
largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0));
-in {
+in
+{
width = "100%:-20";
fixed-center = false;
height = 35;
diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix
index ec8d4f5..9aeb772 100644
--- a/modules/desktop/polybar/default.nix
+++ b/modules/desktop/polybar/default.nix
@@ -1,11 +1,18 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
config = lib.mkIf config.desktop.enable {
services.polybar.enable = true;
- services.polybar.package = (pkgs.polybar.override {
- pulseSupport = 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; })
diff --git a/modules/desktop/sxhkd/default.nix b/modules/desktop/sxhkd/default.nix
index 19bc540..fe8acbb 100644
--- a/modules/desktop/sxhkd/default.nix
+++ b/modules/desktop/sxhkd/default.nix
@@ -1,42 +1,39 @@
-{ pkgs, config, lib, ... }:
+{
+ 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; })
+ 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 "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 "r" "Application launcher." "rofi -show drun")
- (createKeybinding
- "t"
- "Launch terminal."
- "kitty")
+ (createKeybinding "t" "Launch terminal." "kitty")
- (createKeybinding
- "f"
- "Launch File Manager."
- "kitty --title 'File Manager' --class floating-termial -e nnn")
- ];
+ (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 bc508e6..c48c86b 100644
--- a/modules/desktop/sxhkd/keybindings/brightnessctl.nix
+++ b/modules/desktop/sxhkd/keybindings/brightnessctl.nix
@@ -1,15 +1,14 @@
-{ createKeybindingBase, pkgs, lib }:
+{
+ createKeybindingBase,
+ pkgs,
+ lib,
+}:
let
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
-in lib.mkMerge [
- (createKeybindingBase
- "XF86MonBrightnessDown"
- "Decrease brightness."
- "${brightnessctl} set 5%-")
+in
+lib.mkMerge [
+ (createKeybindingBase "XF86MonBrightnessDown" "Decrease brightness." "${brightnessctl} set 5%-")
- (createKeybindingBase
- "XF86MonBrightnessUp"
- "Increase 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 cd838a3..097b976 100644
--- a/modules/desktop/sxhkd/keybindings/bspwm.nix
+++ b/modules/desktop/sxhkd/keybindings/bspwm.nix
@@ -1,45 +1,36 @@
-{ createKeybinding, pkgs, lib }:
+{
+ createKeybinding,
+ pkgs,
+ lib,
+}:
let
bspc = "${pkgs.bspwm}/bin/bspc";
-in lib.mkMerge [
- (createKeybinding
- "q"
- "Kill current window."
- "${bspc} node -c")
+in
+lib.mkMerge [
+ (createKeybinding "q" "Kill current window." "${bspc} node -c")
- (createKeybinding
- "{1-9,0}"
- "Switch workspace."
- "${bspc} desktop -f {1-9,10}")
+ (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 "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 "{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}")
+ (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 "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 2092a71..0f0b3d8 100644
--- a/modules/desktop/sxhkd/keybindings/maim.nix
+++ b/modules/desktop/sxhkd/keybindings/maim.nix
@@ -1,15 +1,18 @@
-{ createKeybinding, pkgs, lib }:
+{
+ createKeybinding,
+ pkgs,
+ lib,
+}:
let
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")
+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 "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 e7f056e..4b495aa 100644
--- a/modules/desktop/sxhkd/keybindings/pamixer.nix
+++ b/modules/desktop/sxhkd/keybindings/pamixer.nix
@@ -1,20 +1,16 @@
-{ createKeybindingBase, pkgs, lib }:
+{
+ createKeybindingBase,
+ pkgs,
+ lib,
+}:
let
pamixer = "${pkgs.pamixer}/bin/pamixer";
-in lib.mkMerge [
- (createKeybindingBase
- "XF86AudioLowerVolume"
- "Decrease volume."
- "${pamixer} --decrease 5")
+in
+lib.mkMerge [
+ (createKeybindingBase "XF86AudioLowerVolume" "Decrease volume." "${pamixer} --decrease 5")
- (createKeybindingBase
- "XF86AudioRaiseVolume"
- "Increase volume."
- "${pamixer} --increase 5")
+ (createKeybindingBase "XF86AudioRaiseVolume" "Increase volume." "${pamixer} --increase 5")
- (createKeybindingBase
- "XF86AudioMute"
- "Mute audio."
- "${pamixer} --toggle-mute")
+ (createKeybindingBase "XF86AudioMute" "Mute audio." "${pamixer} --toggle-mute")
]
diff --git a/modules/desktop/sxhkd/keybindings/playerctl.nix b/modules/desktop/sxhkd/keybindings/playerctl.nix
index 7c3b796..e9d744e 100644
--- a/modules/desktop/sxhkd/keybindings/playerctl.nix
+++ b/modules/desktop/sxhkd/keybindings/playerctl.nix
@@ -1,10 +1,12 @@
-{ createKeybindingBase, pkgs, lib }:
+{
+ createKeybindingBase,
+ pkgs,
+ lib,
+}:
let
playerctl = "${pkgs.playerctl}/bin/playerctl";
-in lib.mkMerge [
- (createKeybindingBase
- "XF86AudioPlay"
- "Toggle video / audio player."
- "${playerctl} play-pause")
+in
+lib.mkMerge [
+ (createKeybindingBase "XF86AudioPlay" "Toggle video / audio player." "${playerctl} play-pause")
]
diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix
index 4bd664f..110bd1d 100644
--- a/modules/fonts/default.nix
+++ b/modules/fonts/default.nix
@@ -1,4 +1,9 @@
-{ lib, config, pkgs, ... }:
+{
+ lib,
+ config,
+ pkgs,
+ ...
+}:
{
options.fonts = {
diff --git a/modules/scripts/default.nix b/modules/scripts/default.nix
index 8e7d7d2..e2d7886 100644
--- a/modules/scripts/default.nix
+++ b/modules/scripts/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
config = {
@@ -6,31 +11,26 @@
"${config.home.homeDirectory}/scripts"
];
- home.file = let
- shellScript = path: {
- text = ''
- #!${pkgs.bash}/bin/bash
- ${builtins.readFile path}
- '';
- executable = true;
+ home.file =
+ let
+ shellScript = path: {
+ text = ''
+ #!${pkgs.bash}/bin/bash
+ ${builtins.readFile path}
+ '';
+ executable = true;
+ };
+ in
+ {
+ "scripts/deep-clean" = shellScript ./deep-clean.sh;
+ "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);
};
- in {
- "scripts/deep-clean" = shellScript ./deep-clean.sh;
- "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/tools/atac/default.nix b/modules/tools/atac/default.nix
index 5babb7b..ad70531 100644
--- a/modules/tools/atac/default.nix
+++ b/modules/tools/atac/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.atac = {
diff --git a/modules/tools/bluetui/default.nix b/modules/tools/bluetui/default.nix
index fa227a9..027b140 100644
--- a/modules/tools/bluetui/default.nix
+++ b/modules/tools/bluetui/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.bluetui = {
diff --git a/modules/tools/bottles/default.nix b/modules/tools/bottles/default.nix
index 10ab05a..e2a4698 100644
--- a/modules/tools/bottles/default.nix
+++ b/modules/tools/bottles/default.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.bottles = {
diff --git a/modules/tools/brightnessctl/default.nix b/modules/tools/brightnessctl/default.nix
index 7b0aa51..73d373b 100644
--- a/modules/tools/brightnessctl/default.nix
+++ b/modules/tools/brightnessctl/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.brightnessctl = {
diff --git a/modules/tools/cloudflare-warp/default.nix b/modules/tools/cloudflare-warp/default.nix
index 4e55d9b..b2546a4 100644
--- a/modules/tools/cloudflare-warp/default.nix
+++ b/modules/tools/cloudflare-warp/default.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.cloudflare-warp = {
diff --git a/modules/tools/devenv/default.nix b/modules/tools/devenv/default.nix
index ddb7716..16c0962 100644
--- a/modules/tools/devenv/default.nix
+++ b/modules/tools/devenv/default.nix
@@ -1,20 +1,25 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.devenv = {
enable = lib.mkEnableOption "Enables devenv.";
};
- config = let
- shellIntegration = builtins.readFile ./alias.sh;
- in lib.mkIf config.tools.devenv.enable {
- home.packages = with pkgs; [
- devenv
- ];
+ config =
+ let
+ shellIntegration = builtins.readFile ./alias.sh;
+ 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);
- };
+ 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/fzf/default.nix b/modules/tools/fzf/default.nix
index 27350d4..4061b4f 100644
--- a/modules/tools/fzf/default.nix
+++ b/modules/tools/fzf/default.nix
@@ -1,56 +1,54 @@
-{ config, lib,... }:
+{ config, lib, ... }:
{
options.tools.fzf = {
enable = lib.mkEnableOption "Enables fzf.";
};
- config = let
- shellIntegration = ''
-${if config.tools.zsh.enable then
- "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)
+ config =
+ let
+ shellIntegration = ''
+ ${if config.tools.zsh.enable then "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);
- };
+ 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 c3e6dd1..caca75b 100644
--- a/modules/tools/git/default.nix
+++ b/modules/tools/git/default.nix
@@ -27,9 +27,8 @@
};
# The base directory of the credential file must exist
- home.activation.createGitCacheDirectory
- = lib.hm.dag.entryAfter
- [ "writeBoundary" ]
- "mkdir -p ${config.xdg.cacheHome}/git";
+ 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 c177d1d..1481df3 100644
--- a/modules/tools/htop/default.nix
+++ b/modules/tools/htop/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, lib, config, ... }:
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
{
options.tools.htop = {
diff --git a/modules/tools/impala/default.nix b/modules/tools/impala/default.nix
index 86eed5e..3a5e341 100644
--- a/modules/tools/impala/default.nix
+++ b/modules/tools/impala/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.impala = {
diff --git a/modules/tools/libreoffice/default.nix b/modules/tools/libreoffice/default.nix
index 12fbf75..603bef0 100644
--- a/modules/tools/libreoffice/default.nix
+++ b/modules/tools/libreoffice/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.libreoffice = {
diff --git a/modules/tools/librewolf/default.nix b/modules/tools/librewolf/default.nix
index c093337..1e8db6f 100644
--- a/modules/tools/librewolf/default.nix
+++ b/modules/tools/librewolf/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.librewolf = {
diff --git a/modules/tools/maim/default.nix b/modules/tools/maim/default.nix
index e602296..247994b 100644
--- a/modules/tools/maim/default.nix
+++ b/modules/tools/maim/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.maim = {
diff --git a/modules/tools/nixvim/default.nix b/modules/tools/nixvim/default.nix
index 6dd7b85..f9c604e 100644
--- a/modules/tools/nixvim/default.nix
+++ b/modules/tools/nixvim/default.nix
@@ -11,8 +11,7 @@
enable = lib.mkEnableOption "Enables nixvim.";
};
- config = lib.mkIf config.tools.nixvim.enable
- {
+ config = lib.mkIf config.tools.nixvim.enable {
programs.nixvim = {
enable = true;
defaultEditor = true;
diff --git a/modules/tools/nixvim/keymaps.nix b/modules/tools/nixvim/keymaps.nix
index 521363d..66c83bd 100644
--- a/modules/tools/nixvim/keymaps.nix
+++ b/modules/tools/nixvim/keymaps.nix
@@ -3,16 +3,34 @@
{
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-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" ];
+ mode = [
+ "n"
+ "i"
+ ];
+ }
+ {
+ key = "<c-c>";
+ action = "<cmd>NotificationsClear<cr>";
}
- { key = "<c-c>"; action = "<cmd>NotificationsClear<cr>"; }
];
};
}
diff --git a/modules/tools/nixvim/plugins/lualine.nix b/modules/tools/nixvim/plugins/lualine.nix
index 3138887..204bc44 100644
--- a/modules/tools/nixvim/plugins/lualine.nix
+++ b/modules/tools/nixvim/plugins/lualine.nix
@@ -7,29 +7,79 @@
options = {
theme = with config.scheme.withHashtag; {
normal = {
- a = { fg = base00; bg = base0D; gui = "bold"; };
- b = { fg = base05; bg = base01; };
- c = { fg = base05; bg = base00; };
+ 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; };
+ 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; };
+ 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; };
+ 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; };
+ 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/nvim-tree.nix b/modules/tools/nixvim/plugins/nvim-tree.nix
index 813bd30..291946b 100644
--- a/modules/tools/nixvim/plugins/nvim-tree.nix
+++ b/modules/tools/nixvim/plugins/nvim-tree.nix
@@ -8,7 +8,7 @@
dotfiles = false;
git_clean = false;
no_buffer = false;
- custom = {};
+ custom = { };
};
git = {
enable = true;
diff --git a/modules/tools/nixvim/plugins/treesitter.nix b/modules/tools/nixvim/plugins/treesitter.nix
index 7100ba1..d62d250 100644
--- a/modules/tools/nixvim/plugins/treesitter.nix
+++ b/modules/tools/nixvim/plugins/treesitter.nix
@@ -7,8 +7,12 @@
enable = true;
};
settings = {
- highlight = { enable = true; };
- indent = { enable = true; };
+ highlight = {
+ enable = true;
+ };
+ indent = {
+ enable = true;
+ };
};
};
}
diff --git a/modules/tools/nixvim/plugins/which-key.nix b/modules/tools/nixvim/plugins/which-key.nix
index e5b96a5..8b78dcc 100644
--- a/modules/tools/nixvim/plugins/which-key.nix
+++ b/modules/tools/nixvim/plugins/which-key.nix
@@ -7,9 +7,14 @@
plugins = {
marks = true;
registers = true;
- spelling = { enabled = true; suggestions = 20; };
+ spelling = {
+ enabled = true;
+ suggestions = 20;
+ };
+ };
+ win = {
+ border = "single";
};
- win = { border = "single"; };
};
};
}
diff --git a/modules/tools/nnn/default.nix b/modules/tools/nnn/default.nix
index aaab53d..98c0877 100644
--- a/modules/tools/nnn/default.nix
+++ b/modules/tools/nnn/default.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.nnn = {
diff --git a/modules/tools/nvtop/default.nix b/modules/tools/nvtop/default.nix
index 10103e6..c011def 100644
--- a/modules/tools/nvtop/default.nix
+++ b/modules/tools/nvtop/default.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.nvtop = {
diff --git a/modules/tools/pamixer/default.nix b/modules/tools/pamixer/default.nix
index 0a34131..971b385 100644
--- a/modules/tools/pamixer/default.nix
+++ b/modules/tools/pamixer/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.pamixer = {
diff --git a/modules/tools/playerctl/default.nix b/modules/tools/playerctl/default.nix
index 16ce781..93e8ade 100644
--- a/modules/tools/playerctl/default.nix
+++ b/modules/tools/playerctl/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.playerctl = {
diff --git a/modules/tools/rofi/default.nix b/modules/tools/rofi/default.nix
index f8c2e02..b4e2ca6 100644
--- a/modules/tools/rofi/default.nix
+++ b/modules/tools/rofi/default.nix
@@ -9,67 +9,76 @@
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;
+ 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";
- };
+ 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;
- };
+ window = {
+ border-color = mkLiteral base03;
+ };
- mainbox = {
- children = map mkLiteral [ "inputbar" "listview" ];
- };
+ mainbox = {
+ children = map mkLiteral [
+ "inputbar"
+ "listview"
+ ];
+ };
- inputbar = {
- background-color = mkLiteral "@bg-alt";
- children = map mkLiteral [ "prompt" "entry" ];
- };
+ inputbar = {
+ background-color = mkLiteral "@bg-alt";
+ children = map mkLiteral [
+ "prompt"
+ "entry"
+ ];
+ };
- entry = {
- background-color = mkLiteral "inherit";
- padding = mkLiteral "12px 3px";
- };
+ entry = {
+ background-color = mkLiteral "inherit";
+ padding = mkLiteral "12px 3px";
+ };
- prompt = {
- background-color = mkLiteral "inherit";
- padding = mkLiteral "12px";
- };
+ prompt = {
+ background-color = mkLiteral "inherit";
+ padding = mkLiteral "12px";
+ };
- listview = {
- lines = 8;
- };
+ listview = {
+ lines = 8;
+ };
- element = {
- children = map mkLiteral [ "element-text" ];
- };
+ element = {
+ children = map mkLiteral [ "element-text" ];
+ };
- element-icon = {
- padding = mkLiteral "10px 10px";
- };
+ element-icon = {
+ padding = mkLiteral "10px 10px";
+ };
- element-text = {
- padding = mkLiteral "10px 10px";
- text-color = mkLiteral "@fg-alt";
- };
+ element-text = {
+ padding = mkLiteral "10px 10px";
+ text-color = mkLiteral "@fg-alt";
+ };
- "element-text selected" = {
- text-color = mkLiteral "@fg";
+ "element-text selected" = {
+ text-color = mkLiteral "@fg";
+ };
};
- };
};
};
}
diff --git a/modules/tools/starship/default.nix b/modules/tools/starship/default.nix
index d3ed86c..616afb3 100644
--- a/modules/tools/starship/default.nix
+++ b/modules/tools/starship/default.nix
@@ -10,57 +10,58 @@
enable = true;
enableZshIntegration = config.tools.zsh.enable;
settings =
- let
- mkSegment = content: ''[┄\[](red)[${content}]($style)[\]](red)'';
- in {
- add_newline = true;
+ 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'';
+ format = ''''\n[╭─\[](red)$hostname[@](red)$username[\]](red)$directory$git_branch$git_status$nix_shell''\n[╰─](red)$status$character ''\n'';
- character.format = "[](red)";
+ character.format = "[](red)";
- username = {
- style_user = "blue";
- style_root = "red bold";
- format = "[$user]($style)";
- show_always = true;
- };
+ username = {
+ style_user = "blue";
+ style_root = "red bold";
+ format = "[$user]($style)";
+ show_always = true;
+ };
- hostname = {
- ssh_only = false;
- style = "green";
- format = "[$hostname]($style)";
- };
+ hostname = {
+ ssh_only = false;
+ style = "green";
+ format = "[$hostname]($style)";
+ };
- directory = {
- style = "purple";
- truncate_to_repo = false;
- format = mkSegment "$path";
- };
+ directory = {
+ style = "purple";
+ truncate_to_repo = false;
+ format = mkSegment "$path";
+ };
- git_branch = {
- style = "bold yellow";
- format = ''[┄\[](red)[$symbol$branch(:$remote_branch)]($style)'';
- };
+ git_branch = {
+ style = "bold yellow";
+ format = ''[┄\[](red)[$symbol$branch(:$remote_branch)]($style)'';
+ };
- git_status = {
- style = "cyan";
- format = ''( [$all_status$ahead_behind]($style))[\]](red)'';
- };
+ git_status = {
+ style = "cyan";
+ format = ''( [$all_status$ahead_behind]($style))[\]](red)'';
+ };
- nix_shell = {
- format = mkSegment "$symbol $state( \($name\))";
- symbol = "󱄅";
- impure_msg = "󰻌";
- pure_msg = "󰕥";
- };
+ nix_shell = {
+ format = mkSegment "$symbol $state( \($name\))";
+ symbol = "󱄅";
+ impure_msg = "󰻌";
+ pure_msg = "󰕥";
+ };
- status = {
- disabled = false;
- format = ''${mkSegment "$symbol $status"}[┄─](red)'';
- style = "white";
+ 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 ca265b5..7d79765 100644
--- a/modules/tools/steam/default.nix
+++ b/modules/tools/steam/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.steam = {
diff --git a/modules/tools/systemctl-tui/default.nix b/modules/tools/systemctl-tui/default.nix
index 6c9a706..12c221e 100644
--- a/modules/tools/systemctl-tui/default.nix
+++ b/modules/tools/systemctl-tui/default.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
{
options.tools.systemctl-tui = {
diff --git a/modules/tools/tor-browser/default.nix b/modules/tools/tor-browser/default.nix
index f69fa27..8b0852b 100644
--- a/modules/tools/tor-browser/default.nix
+++ b/modules/tools/tor-browser/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, lib, config, ... }:
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
{
options.tools.tor-browser = {
diff --git a/modules/tools/unar/default.nix b/modules/tools/unar/default.nix
index e289fb0..6b980c9 100644
--- a/modules/tools/unar/default.nix
+++ b/modules/tools/unar/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, lib, config, ... }:
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
{
options.tools.unar = {
diff --git a/modules/tools/vlc/default.nix b/modules/tools/vlc/default.nix
index 515f181..30deaea 100644
--- a/modules/tools/vlc/default.nix
+++ b/modules/tools/vlc/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.vlc = {
diff --git a/modules/tools/vscode/default.nix b/modules/tools/vscode/default.nix
index b196054..63a25ba 100644
--- a/modules/tools/vscode/default.nix
+++ b/modules/tools/vscode/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
options.tools.vscode = {
diff --git a/modules/tools/zsh/default.nix b/modules/tools/zsh/default.nix
index fcb7829..294fb5a 100644
--- a/modules/tools/zsh/default.nix
+++ b/modules/tools/zsh/default.nix
@@ -5,28 +5,29 @@
enable = lib.mkEnableOption "Enables zsh.";
};
- config = let
- nixCommandWrappers = builtins.readFile ./nix-aliases.sh;
- in lib.mkIf config.tools.zsh.enable {
- programs.zsh = {
- enable = true;
- dotDir = "${config.xdg.configHome}/zsh";
- history.path = "${config.xdg.cacheHome}/zsh/history";
- enableCompletion = true;
- initContent = ''
- setopt PROMPT_SUBST
+ config =
+ let
+ nixCommandWrappers = builtins.readFile ./nix-aliases.sh;
+ in
+ lib.mkIf config.tools.zsh.enable {
+ programs.zsh = {
+ enable = true;
+ dotDir = "${config.xdg.configHome}/zsh";
+ history.path = "${config.xdg.cacheHome}/zsh/history";
+ enableCompletion = true;
+ initContent = ''
+ setopt PROMPT_SUBST
- autoload -U colors && colors
+ autoload -U colors && colors
- bindkey "^[[3~" delete-char
- bindkey "^?" backward-delete-char
- ${nixCommandWrappers}
- '';
- };
+ bindkey "^[[3~" delete-char
+ bindkey "^?" backward-delete-char
+ ${nixCommandWrappers}
+ '';
+ };
- programs.bash.initExtra = lib.mkIf config.programs.bash.enable
- (lib.mkAfter nixCommandWrappers);
+ programs.bash.initExtra = lib.mkIf config.programs.bash.enable (lib.mkAfter nixCommandWrappers);
- home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh";
- };
+ home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh";
+ };
}