2023-10-14 20:49:30 +01:00
|
|
|
|
{ config, lib, pkgs, tokyonight-folke, gitui, ... }:
|
2023-09-15 07:13:52 +01:00
|
|
|
|
|
|
|
|
|
{
|
2023-09-20 09:00:22 +01:00
|
|
|
|
programs = {
|
|
|
|
|
bash.enable = true;
|
|
|
|
|
readline = {
|
|
|
|
|
enable = true;
|
|
|
|
|
includeSystemConfig = true;
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
set completion-ignore-case On
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
direnv = {
|
|
|
|
|
enable = true;
|
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
|
enableBashIntegration = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
|
fzf = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableBashIntegration = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
};
|
|
|
|
|
git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.gitFull;
|
|
|
|
|
userName = "Evie Litherland-Smith";
|
|
|
|
|
userEmail = lib.mkDefault "evie@xenia.me.uk";
|
|
|
|
|
delta = {
|
|
|
|
|
enable = true;
|
|
|
|
|
options = {
|
|
|
|
|
blame-code-style = "syntax";
|
|
|
|
|
line-numbers = true;
|
|
|
|
|
navigate = true;
|
|
|
|
|
side-by-side = true;
|
|
|
|
|
zero-style = "dim syntax";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
extraConfig = {
|
|
|
|
|
pull.rebase = false;
|
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
|
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
gitui = {
|
|
|
|
|
enable = true;
|
|
|
|
|
keyConfig = builtins.readFile "${gitui}/vim_style_key_config.ron";
|
2023-10-14 20:49:30 +01:00
|
|
|
|
theme = builtins.readFile
|
|
|
|
|
"${tokyonight-folke}/extras/gitui/tokyonight_night.ron";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
};
|
2023-10-14 20:49:30 +01:00
|
|
|
|
bat.enable = true;
|
2023-10-09 11:40:25 +01:00
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
forwardAgent = true;
|
|
|
|
|
serverAliveInterval = 15;
|
|
|
|
|
serverAliveCountMax = 3;
|
|
|
|
|
controlMaster = "auto";
|
|
|
|
|
controlPersist = "10s";
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
AddKeysToAgent=yes
|
|
|
|
|
SetEnv TERM=xterm-256color
|
|
|
|
|
'';
|
|
|
|
|
matchBlocks = {
|
|
|
|
|
"vanguard" = {
|
|
|
|
|
user = "xenia";
|
|
|
|
|
hostname = "192.168.1.166";
|
|
|
|
|
};
|
|
|
|
|
"legion" = {
|
|
|
|
|
user = "xenia";
|
|
|
|
|
hostname = "192.168.1.230";
|
|
|
|
|
};
|
|
|
|
|
"ionos" = {
|
|
|
|
|
user = "root";
|
|
|
|
|
hostname = "77.68.67.133";
|
|
|
|
|
};
|
|
|
|
|
"freia".hostname = "freia020.hpc.l";
|
|
|
|
|
"freia???" =
|
|
|
|
|
lib.hm.dag.entryAfter [ "freia" ] { hostname = "%h.hpc.l"; };
|
|
|
|
|
"heimdall".hostname = "heimdall003.jet.uk";
|
|
|
|
|
"heimdall???" =
|
|
|
|
|
lib.hm.dag.entryAfter [ "heimdall" ] { hostname = "%h.jet.uk"; };
|
|
|
|
|
"freia* heimdall*" = lib.hm.dag.entryAfter [
|
|
|
|
|
"freia"
|
|
|
|
|
"freia???"
|
|
|
|
|
"heimdall"
|
|
|
|
|
"heimdall???"
|
|
|
|
|
] {
|
|
|
|
|
user = "elitherl";
|
|
|
|
|
compression = true;
|
|
|
|
|
};
|
|
|
|
|
"git*".user = "git";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableBashIntegration = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
settings = {
|
|
|
|
|
command_timeout = 1000;
|
|
|
|
|
add_newline = true;
|
|
|
|
|
character = {
|
2023-10-14 20:49:30 +01:00
|
|
|
|
success_symbol = "[ ❯](green)";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
error_symbol = "[❯](red)";
|
|
|
|
|
};
|
|
|
|
|
directory = {
|
|
|
|
|
truncation_length = 2;
|
|
|
|
|
fish_style_pwd_dir_length = 1;
|
|
|
|
|
read_only = " ";
|
2023-10-14 20:49:30 +01:00
|
|
|
|
# style = "bold lavender";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
truncate_to_repo = false;
|
2023-10-14 20:49:30 +01:00
|
|
|
|
# before_repo_root_style = "bold lavender";
|
|
|
|
|
# repo_root_style = "bold teal";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
};
|
|
|
|
|
line_break.disabled = false;
|
|
|
|
|
git_branch = {
|
2023-10-13 09:55:41 +01:00
|
|
|
|
symbol = " ";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
only_attached = true;
|
|
|
|
|
ignore_branches = [ "master" "main" ];
|
|
|
|
|
};
|
|
|
|
|
git_commit = {
|
|
|
|
|
format = "[ $hash$tag]($style) ";
|
|
|
|
|
tag_symbol = "";
|
|
|
|
|
tag_disabled = false;
|
|
|
|
|
};
|
|
|
|
|
git_metrics.disabled = false;
|
|
|
|
|
hostname = {
|
|
|
|
|
ssh_only = true;
|
|
|
|
|
ssh_symbol = " ";
|
2023-10-14 20:49:30 +01:00
|
|
|
|
# style = "bold green";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
};
|
|
|
|
|
localip.disabled = false;
|
|
|
|
|
memory_usage = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
symbol = " ";
|
|
|
|
|
};
|
|
|
|
|
nix_shell.symbol = " ";
|
|
|
|
|
os = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
format = "on [$symbol $name ]($style)";
|
2023-10-14 20:49:30 +01:00
|
|
|
|
# style = "bold blue";
|
2023-10-09 11:40:25 +01:00
|
|
|
|
symbols = {
|
|
|
|
|
Alpine = " ";
|
|
|
|
|
Android = " ";
|
|
|
|
|
Arch = " ";
|
|
|
|
|
CentOS = " ";
|
|
|
|
|
Debian = " ";
|
|
|
|
|
EndeavourOS = " ";
|
|
|
|
|
Fedora = " ";
|
|
|
|
|
FreeBSD = " ";
|
|
|
|
|
Gentoo = " ";
|
|
|
|
|
Illumos = " ";
|
|
|
|
|
Linux = " ";
|
|
|
|
|
Macos = " ";
|
|
|
|
|
Manjaro = " ";
|
|
|
|
|
Mint = " ";
|
|
|
|
|
NixOS = " ";
|
|
|
|
|
OpenBSD = " ";
|
|
|
|
|
openSUSE = " ";
|
|
|
|
|
Pop = " ";
|
|
|
|
|
Raspbian = " ";
|
|
|
|
|
Redhat = " ";
|
|
|
|
|
RedHatEnterprise = " ";
|
|
|
|
|
Solus = " ";
|
|
|
|
|
SUSE = " ";
|
|
|
|
|
Ubuntu = " ";
|
|
|
|
|
Unknown = " ";
|
|
|
|
|
Windows = " ";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
python = {
|
|
|
|
|
symbol = " ";
|
|
|
|
|
python_binary = "python3";
|
|
|
|
|
};
|
|
|
|
|
shell = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
format = "using [$indicator ]($style)";
|
|
|
|
|
};
|
|
|
|
|
sudo = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
symbol = " ";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
tmux = {
|
|
|
|
|
enable = true;
|
|
|
|
|
baseIndex = 1;
|
|
|
|
|
clock24 = true;
|
|
|
|
|
keyMode = "emacs";
|
|
|
|
|
mouse = true;
|
|
|
|
|
secureSocket = true;
|
|
|
|
|
sensibleOnTop = true;
|
|
|
|
|
shortcut = "Space";
|
|
|
|
|
terminal = "xterm-256color";
|
2023-10-14 20:49:30 +01:00
|
|
|
|
plugins = with pkgs.tmuxPlugins; [ yank tmux-fzf ];
|
2023-10-09 11:40:25 +01:00
|
|
|
|
extraConfig = ''
|
|
|
|
|
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
|
|
|
|
|
set -ga terminal-overrides ",*256col*,alacritty:Tc"
|
|
|
|
|
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
|
|
|
|
set-environment -g COLORTERM "truecolor"
|
|
|
|
|
|
|
|
|
|
# easy-to-remember split pane commands
|
|
|
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
|
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
|
'';
|
|
|
|
|
};
|
2023-09-20 09:00:22 +01:00
|
|
|
|
zsh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
|
enableCompletion = true;
|
|
|
|
|
syntaxHighlighting.enable = true;
|
|
|
|
|
enableVteIntegration = true;
|
|
|
|
|
autocd = true;
|
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
|
historySubstringSearch.enable = true;
|
|
|
|
|
history.path = "${config.xdg.dataHome}/zsh/history";
|
|
|
|
|
initExtra = ''
|
|
|
|
|
xdg-query-program () {
|
|
|
|
|
FILETYPE=$(xdg-mime query filetype $@)
|
|
|
|
|
DEFAULT=$(xdg-mime query default $FILETYPE)
|
|
|
|
|
echo "$FILETYPE -> $DEFAULT"
|
|
|
|
|
}
|
2023-09-28 13:46:08 +01:00
|
|
|
|
rsync-local-config () {
|
|
|
|
|
HOST=$1
|
|
|
|
|
for TARGET in emacs doom starship.toml; do
|
|
|
|
|
SOURCE="${config.xdg.configHome}/$TARGET"
|
|
|
|
|
if [[ -e ${config.xdg.configHome}/$TARGET ]]; then
|
|
|
|
|
[[ -d $SOURCE ]] && SOURCE="$SOURCE/"
|
|
|
|
|
${pkgs.rsync}/bin/rsync -avzL $SOURCE $HOST:.config/$TARGET
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
2023-09-20 09:00:22 +01:00
|
|
|
|
'';
|
|
|
|
|
oh-my-zsh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
plugins = [
|
|
|
|
|
# Productivity
|
|
|
|
|
"aliases"
|
|
|
|
|
"colored-man-pages"
|
|
|
|
|
"command-not-found"
|
|
|
|
|
"extract"
|
|
|
|
|
# Build tools
|
|
|
|
|
"git"
|
|
|
|
|
"gitignore"
|
|
|
|
|
# Misc
|
|
|
|
|
"lol"
|
|
|
|
|
"rand-quote"
|
|
|
|
|
];
|
|
|
|
|
theme = "";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-09-15 07:13:52 +01:00
|
|
|
|
}
|