Skip to content

Commit

Permalink
refactor: cleanup cli configs
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Apr 17, 2024
1 parent e07e3be commit ed59ba3
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 66 deletions.
32 changes: 15 additions & 17 deletions home/isabel/configs/cli/atuin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,23 @@
}: let
inherit (lib) mkIf isModernShell;
in {
config = mkIf (isModernShell osConfig) {
programs.atuin = {
enable = true;
programs.atuin = mkIf (isModernShell osConfig) {
enable = true;

enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
enableNushellIntegration = config.programs.nushell.enable;
enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
enableNushellIntegration = config.programs.nushell.enable;

flags = ["--disable-up-arrow"];
settings = {
dialect = "uk";
show_preview = true;
inline_height = 30;
style = "compact";
update_check = false;
sync_address = "https://atuin.isabelroses.com";
sync_frequency = "5m";
};
flags = ["--disable-up-arrow"];
settings = {
dialect = "uk";
show_preview = true;
inline_height = 30;
style = "compact";
update_check = false;
sync_address = "https://atuin.isabelroses.com";
sync_frequency = "5m";
};
};
}
12 changes: 4 additions & 8 deletions home/isabel/configs/cli/bat.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
lib,
osConfig,
...
}: let
acceptedTypes = ["desktop" "laptop" "wsl" "lite" "hybrid"];
in {
config = lib.mkIf ((lib.isAcceptedDevice osConfig acceptedTypes) && lib.isModernShell osConfig) {
programs.bat = {
enable = true;
catppuccin.enable = true;
};
}: {
programs.bat = lib.mkIf (lib.isModernShell osConfig) {
enable = true;
catppuccin.enable = true;
};
}
3 changes: 2 additions & 1 deletion home/isabel/configs/cli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
./freeze.nix
./fzf.nix
./hyfetch.nix
./ripgrep.nix
./starship.nix
./tealdear.nix
# ./tealdear.nix
./zoxide.nix
];
}
30 changes: 14 additions & 16 deletions home/isabel/configs/cli/eza.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
}: let
inherit (lib) mkIf isModernShell;
in {
config = mkIf (isModernShell osConfig) {
programs.eza = {
enable = true;
icons = true;
programs.eza = mkIf (isModernShell osConfig) {
enable = true;
icons = true;

enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
# enableNushellIntegration = config.programs.nushell.enable;
enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
# enableNushellIntegration = config.programs.nushell.enable;

extraOptions = [
"--group"
"--group-directories-first"
"--header"
"--no-permissions"
"--octal-permissions"
];
};
extraOptions = [
"--group"
"--group-directories-first"
"--header"
"--no-permissions"
"--octal-permissions"
];
};
}
20 changes: 8 additions & 12 deletions home/isabel/configs/cli/fzf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
config,
osConfig,
...
}: let
acceptedTypes = ["desktop" "laptop" "wsl" "lite" "hybrid"];
in {
config = lib.mkIf ((lib.isAcceptedDevice osConfig acceptedTypes) && lib.isModernShell osConfig) {
programs.fzf = {
enable = true;
catppuccin.enable = true;
}: {
programs.fzf = lib.mkIf (lib.isModernShell osConfig) {
enable = true;
catppuccin.enable = true;

enableBashIntegration = config.programs.bash.enable;
enableZshIntegration = config.programs.zsh.enable;
enableFishIntegration = config.programs.fish.enable;
enableBashIntegration = config.programs.bash.enable;
enableZshIntegration = config.programs.zsh.enable;
enableFishIntegration = config.programs.fish.enable;

defaultOptions = ["--height=30%" "--layout=reverse" "--info=inline"];
};
defaultOptions = ["--height=30%" "--layout=reverse" "--info=inline"];
};
}
19 changes: 19 additions & 0 deletions home/isabel/configs/cli/ripgrep.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
lib,
osConfig,
...
}: let
inherit (lib) mkIf isModernShell;
in {
programs.ripgrep = mkIf (isModernShell osConfig) {
enable = true;

# https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file
arguments = [
"--max-columns=150"
"--max-columns-preview"
"--glob=!.git/*"
"--smart-case"
];
};
}
18 changes: 8 additions & 10 deletions home/isabel/configs/cli/tealdear.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
osConfig,
...
}: {
config = lib.mkIf (lib.isModernShell osConfig) {
programs.tealdeer = {
enable = true;
settings = {
display = {
compact = false;
use_pager = true;
};

updates.auto_update = false;
programs.tealdeer = lib.mkIf (lib.isModernShell osConfig) {
enable = true;
settings = {
display = {
compact = false;
use_pager = true;
};

updates.auto_update = false;
};
};
}
3 changes: 1 addition & 2 deletions home/isabel/packages/cli/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ in {
nix-output-monitor # much nicer nix build output
]
++ optionals cfg.cli.modernShell.enable [
ripgrep # much better and faster grep
vhs # programatically make gifs
vhs # programmatically make gifs
glow # markdown preview
]
++ optionals stdenv.isLinux [
Expand Down

0 comments on commit ed59ba3

Please sign in to comment.