nixos/home/default.nix
Evie Litherland-Smith 46371470ee Disable emacs daemon
Set custom mu4e modeline icons because it was annoying me

Update keybinds, all workspaces now have a "default" program so to speak
with associated keybind to launch
2023-10-10 16:02:01 +01:00

269 lines
7.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, lib, pkgs, catppuccin-themes, gitui, ... }:
{
stylix.targets = {
fzf.enable = true;
tmux.enable = true;
};
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;
};
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;
syntax-theme = "Catppuccin";
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";
theme = builtins.readFile catppuccin-themes.gitui;
};
bat = {
enable = true;
config.theme = "Catppuccin";
themes.Catppuccin = builtins.readFile catppuccin-themes.bat;
};
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 = {
inherit (builtins.fromTOML
(builtins.readFile catppuccin-themes.starship))
palettes;
command_timeout = 1000;
add_newline = true;
palette = "catppuccin_macchiato";
character = {
success_symbol = "[[󱢠](green) ](maroon)";
error_symbol = "[](red)";
};
directory = {
truncation_length = 2;
fish_style_pwd_dir_length = 1;
read_only = " 󰉐";
style = "bold lavender";
truncate_to_repo = false;
before_repo_root_style = "bold lavender";
repo_root_style = "bold teal";
};
line_break.disabled = false;
git_branch = {
symbol = "";
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 = "󰢹 ";
style = "bold green";
};
localip.disabled = false;
memory_usage = {
disabled = false;
symbol = "󰍛 ";
};
nix_shell.symbol = "󱄅 ";
os = {
disabled = false;
format = "on [$symbol $name ]($style)";
style = "bold blue";
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";
plugins = with pkgs.tmuxPlugins; [ yank tmux-fzf catppuccin ];
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}"
'';
};
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";
initExtraFirst = ''
source ${catppuccin-themes.zsh}
'';
initExtra = ''
xdg-query-program () {
FILETYPE=$(xdg-mime query filetype $@)
DEFAULT=$(xdg-mime query default $FILETYPE)
echo "$FILETYPE -> $DEFAULT"
}
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
}
'';
oh-my-zsh = {
enable = true;
plugins = [
# Productivity
"aliases"
"colored-man-pages"
"command-not-found"
"extract"
# Build tools
"git"
"gitignore"
# Misc
"lol"
"rand-quote"
];
theme = "";
};
};
};
}