aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/system/programs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/terminal/system/programs')
-rw-r--r--modules/terminal/system/programs/bash.nix32
-rw-r--r--modules/terminal/system/programs/bat.nix17
-rw-r--r--modules/terminal/system/programs/broot.nix27
-rw-r--r--modules/terminal/system/programs/eza.nix17
-rw-r--r--modules/terminal/system/programs/fish.nix22
-rw-r--r--modules/terminal/system/programs/fzf.nix17
-rw-r--r--modules/terminal/system/programs/helix.nix25
-rw-r--r--modules/terminal/system/programs/starship.nix35
-rw-r--r--modules/terminal/system/programs/tmux.nix1
9 files changed, 135 insertions, 58 deletions
diff --git a/modules/terminal/system/programs/bash.nix b/modules/terminal/system/programs/bash.nix
new file mode 100644
index 0000000..ed2c226
--- /dev/null
+++ b/modules/terminal/system/programs/bash.nix
@@ -0,0 +1,32 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.collinux.terminal.shells.bash;
+in
+ lib.mkIf cfg.enable {
+ hjem.users."${config.collinux.user.name}" = {
+ files = {
+ ".bashrc".text = ''
+ eval "$(direnv hook bash)"
+
+ for file in ~/.config/bash/conf.d/*; do source "$file"; done
+ '';
+
+ packages = with pkgs; [
+ fish
+ ripgrep
+ fd
+ moreutils
+ zip
+ unzip
+ btop
+ jq
+ direnv
+ pay-respects
+ ];
+ };
+ };
+ }
diff --git a/modules/terminal/system/programs/bat.nix b/modules/terminal/system/programs/bat.nix
index 6f53dd7..d954291 100644
--- a/modules/terminal/system/programs/bat.nix
+++ b/modules/terminal/system/programs/bat.nix
@@ -8,10 +8,19 @@
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
- files.".config/fish/conf.d/bat.fish".text = ''
- alias cat bat
- set -gx BAT_THEME "base16"
- '';
+ files =
+ (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/bat.fish".text = ''
+ alias cat bat
+ set -gx BAT_THEME "base16"
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ ".config/fish/conf.d/bat.bash".text = ''
+ alias cat="bat"
+ export BAT_THEME="base16"
+ '';
+ });
packages = [pkgs.bat];
};
diff --git a/modules/terminal/system/programs/broot.nix b/modules/terminal/system/programs/broot.nix
index b2060d8..6164044 100644
--- a/modules/terminal/system/programs/broot.nix
+++ b/modules/terminal/system/programs/broot.nix
@@ -115,16 +115,23 @@
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
- files = {
- ".config/broot/conf.toml" = {
- generator = (pkgs.formats.toml {}).generate "conf.toml";
- value = conf;
- };
-
- ".config/fish/conf.d/broot.fish".text = lib.mkIf config.collinux.terminal.shells.fish.enable ''
- ${pkgs.broot}/bin/broot --print-shell-function fish | source
- '';
- };
+ files =
+ {
+ ".config/broot/conf.toml" = {
+ generator = (pkgs.formats.toml {}).generate "conf.toml";
+ value = conf;
+ };
+ }
+ // (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/broot.fish".text = ''
+ broot --print-shell-function fish | source
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ ".config/bash/conf.d/broot.bash".text = ''
+ eval "$(broot --print-shell-function bash)"
+ '';
+ });
packages = [pkgs.broot];
};
diff --git a/modules/terminal/system/programs/eza.nix b/modules/terminal/system/programs/eza.nix
index 52c290d..acdcbc2 100644
--- a/modules/terminal/system/programs/eza.nix
+++ b/modules/terminal/system/programs/eza.nix
@@ -8,10 +8,19 @@
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
- files.".config/fish/conf.d/eza.fish".text = ''
- alias ls "eza -A -w 80 --group-directories-first -I '.git*'"
- alias tree "eza -T"
- '';
+ files =
+ (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/eza.fish".text = ''
+ alias ls "eza -A -w 80 --group-directories-first -I '.git*'"
+ alias tree "eza -T"
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/bash/conf.d/eza.bash".text = ''
+ alias ls="eza -A -w 80 --group-directories-first -I '.git*'"
+ alias tree="eza -T"
+ '';
+ });
packages = [pkgs.eza];
};
diff --git a/modules/terminal/system/programs/fish.nix b/modules/terminal/system/programs/fish.nix
index fe3ff88..a210cd5 100644
--- a/modules/terminal/system/programs/fish.nix
+++ b/modules/terminal/system/programs/fish.nix
@@ -5,22 +5,20 @@
...
}: let
cfg = config.collinux.terminal.shells.fish;
-
- init = ''
- set fish_greeting
-
- function fish_title
- echo fish (prompt_pwd)
- end
-
- direnv hook fish | source
- pay-respects fish --alias | source
- '';
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
files = {
- ".config/fish/config.fish".text = init;
+ ".config/fish/config.fish".text = ''
+ set fish_greeting
+
+ function fish_title
+ echo fish (prompt_pwd)
+ end
+
+ direnv hook fish | source
+ pay-respects fish --alias | source
+ '';
};
packages = with pkgs; [
diff --git a/modules/terminal/system/programs/fzf.nix b/modules/terminal/system/programs/fzf.nix
index 486d4e2..fd86566 100644
--- a/modules/terminal/system/programs/fzf.nix
+++ b/modules/terminal/system/programs/fzf.nix
@@ -8,10 +8,19 @@
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
- files.".config/fish/conf.d/fzf.fish".text = ''
- ${pkgs.fzf}/bin/fzf --fish | source
- set -gx FZF_DEFAULT_OPTS "--color bg:#1E1E2E,bg+:#313244,border:#313244,fg:#CDD6F4,fg+:#CDD6F4,header:#F38BA8,hl:#F38BA8,hl+:#F38BA8,info:#CBA6F7,label:#CDD6F4,marker:#B4BEFE,pointer:#F5E0DC,prompt:#CBA6F7,selected-bg:#45475A,spinner:#F5E0DC"
- '';
+ files =
+ (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/fzf.fish".text = ''
+ fzf --fish | source
+ set -gx FZF_DEFAULT_OPTS "--color bg:#1E1E2E,bg+:#313244,border:#313244,fg:#CDD6F4,fg+:#CDD6F4,header:#F38BA8,hl:#F38BA8,hl+:#F38BA8,info:#CBA6F7,label:#CDD6F4,marker:#B4BEFE,pointer:#F5E0DC,prompt:#CBA6F7,selected-bg:#45475A,spinner:#F5E0DC"
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ ".config/bash/conf.d/fzf.bash".text = ''
+ eval "$(fzf --bash)"
+ export FZF_DEFAULT_OPTS="--color bg:#1E1E2E,bg+:#313244,border:#313244,fg:#CDD6F4,fg+:#CDD6F4,header:#F38BA8,hl:#F38BA8,hl+:#F38BA8,info:#CBA6F7,label:#CDD6F4,marker:#B4BEFE,pointer:#F5E0DC,prompt:#CBA6F7,selected-bg:#45475A,spinner:#F5E0DC"
+ '';
+ });
packages = [pkgs.fzf];
};
diff --git a/modules/terminal/system/programs/helix.nix b/modules/terminal/system/programs/helix.nix
index 71dad76..54a6932 100644
--- a/modules/terminal/system/programs/helix.nix
+++ b/modules/terminal/system/programs/helix.nix
@@ -156,15 +156,22 @@ in
generator = (pkgs.formats.toml {}).generate "toml_file";
inherit value;
};
- in {
- ".config/helix/config.toml" = t settings;
- ".config/helix/languages.toml" = t languages;
- ".config/helix/themes/catppuccin_mocha_transparent.toml" = t theme;
-
- ".config/fish/conf.d/helix.fish".text = lib.mkIf config.collinux.terminal.shells.fish.enable ''
- set -gx EDITOR hx
- '';
- };
+ in
+ {
+ ".config/helix/config.toml" = t settings;
+ ".config/helix/languages.toml" = t languages;
+ ".config/helix/themes/catppuccin_mocha_transparent.toml" = t theme;
+ }
+ // (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/helix.fish".text = ''
+ set -gx EDITOR hx
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ ".config/bash/conf.d/helix.bash".text = ''
+ EDITOR=hx
+ '';
+ });
packages = [pkgs.helix];
};
diff --git a/modules/terminal/system/programs/starship.nix b/modules/terminal/system/programs/starship.nix
index c70a132..f0134f0 100644
--- a/modules/terminal/system/programs/starship.nix
+++ b/modules/terminal/system/programs/starship.nix
@@ -36,21 +36,28 @@
in
lib.mkIf cfg.enable {
hjem.users."${config.collinux.user.name}" = {
- files = {
- ".config/starship.toml" = {
- generator = (pkgs.formats.toml {}).generate "starship.toml";
- value = settings;
- };
+ files =
+ {
+ ".config/starship.toml" = {
+ generator = (pkgs.formats.toml {}).generate "starship.toml";
+ value = settings;
+ };
+ }
+ // (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ ".config/fish/conf.d/starship.fish".text = ''
+ function starship_transient_prompt_func
+ starship module character
+ end
- ".config/fish/conf.d/starship.fish".text = lib.mkIf config.collinux.terminal.shells.fish.enable ''
- function starship_transient_prompt_func
- starship module character
- end
-
- starship init fish | source
- enable_transience
- '';
- };
+ starship init fish | source
+ enable_transience
+ '';
+ })
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ ".config/bash/conf.d/starship.bash".text = ''
+ eval "$(starship init bash)"
+ '';
+ });
packages = [pkgs.starship];
};
diff --git a/modules/terminal/system/programs/tmux.nix b/modules/terminal/system/programs/tmux.nix
index 322a912..c349ded 100644
--- a/modules/terminal/system/programs/tmux.nix
+++ b/modules/terminal/system/programs/tmux.nix
@@ -242,7 +242,6 @@
tmux-conf = ''
set -g mouse on
- set -g default-terminal "tmux"
# Panes
bind-key -n C-w kill-pane