summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/seth/shell/default.nix16
-rw-r--r--users/seth/shell/fish.nix22
-rw-r--r--users/seth/shell/zsh.nix12
3 files changed, 28 insertions, 22 deletions
diff --git a/users/seth/shell/default.nix b/users/seth/shell/default.nix
index 93472d9..e8ae1c1 100644
--- a/users/seth/shell/default.nix
+++ b/users/seth/shell/default.nix
@@ -2,7 +2,10 @@
config,
pkgs,
...
-}: {
+}: let
+ inherit (builtins) fromTOML readFile;
+ inherit (pkgs) fetchFromGitHub;
+in {
imports = [
./bash.nix
./fish.nix
@@ -15,7 +18,7 @@
theme = "catppuccin";
};
themes = {
- catppuccin = builtins.readFile (pkgs.fetchFromGitHub {
+ catppuccin = readFile (fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
@@ -24,11 +27,13 @@
+ "/Catppuccin-mocha.tmTheme");
};
};
+
exa = {
enable = true;
enableAliases = true;
icons = true;
};
+
starship = {
enable = true;
enableBashIntegration = false;
@@ -37,10 +42,11 @@
{
format = "$all";
palette = "catppuccin_mocha";
+ command_timeout = 50;
}
- // builtins.fromTOML (builtins.readFile ./starship.toml)
- // builtins.fromTOML (builtins.readFile
- (pkgs.fetchFromGitHub
+ // fromTOML (readFile ./starship.toml)
+ // fromTOML (readFile
+ (fetchFromGitHub
{
owner = "catppuccin";
repo = "starship";
diff --git a/users/seth/shell/fish.nix b/users/seth/shell/fish.nix
index f900349..feb12b3 100644
--- a/users/seth/shell/fish.nix
+++ b/users/seth/shell/fish.nix
@@ -18,6 +18,7 @@
programs.fish = {
enable = true;
+
interactiveShellInit = ''
set -l nixfile ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.fish
if test -e $nixfile
@@ -29,20 +30,19 @@
abbr -a !! --position anywhere --function last_history_item
'';
+
functions = {
last_history_item.body = "echo $history[1]";
};
- plugins = [
- {
- name = "autopair-fish";
- src = pkgs.fetchFromGitHub {
- owner = "jorgebucaran";
- repo = "autopair.fish";
- rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2";
- sha256 = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A=";
- };
- }
- ];
+ plugins = let
+ mkFishPlugins = builtins.map (plugin: {
+ name = plugin;
+ inherit (pkgs.fishPlugins.${plugin}) src;
+ });
+ in
+ mkFishPlugins [
+ "autopair"
+ ];
};
}
diff --git a/users/seth/shell/zsh.nix b/users/seth/shell/zsh.nix
index 75e67b3..b697d02 100644
--- a/users/seth/shell/zsh.nix
+++ b/users/seth/shell/zsh.nix
@@ -8,6 +8,7 @@
programs.zsh = {
enable = true;
enableAutosuggestions = true;
+
completionInit = ''
autoload -Uz bashcompinit compinit
local zdump="${config.xdg.cacheHome}/zsh/zdump"
@@ -19,8 +20,10 @@
fi
unset zdump
'';
+
defaultKeymap = "emacs";
dotDir = ".config/zsh";
+
initExtra = ''
if [[ -r "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh" ]]; then
source "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh"
@@ -62,12 +65,14 @@
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
'';
+
history = {
expireDuplicatesFirst = true;
path = "${config.xdg.stateHome}/zsh/zsh_history";
save = 1000;
size = 100;
};
+
plugins = [
{
name = "cattppuccin-zsh-syntax-highlighting";
@@ -100,17 +105,12 @@
}
{
- name = "zsh-fzf-tab";
- src = pkgs.zsh-fzf-tab;
- file = "share/fzf-tab/fzf-tab.plugin.zsh";
- }
-
- {
name = "zsh-completions";
src = pkgs.zsh-completions;
file = "share/zsh-completions/zsh-completions.plugin.zsh";
}
];
+
enableSyntaxHighlighting = true;
};
}