dotfiles/.config/nix-darwin/users/sloane/default.nix

190 lines
4.2 KiB
Nix
Raw Normal View History

2024-03-29 20:49:45 -04:00
{ pkgs, ... }:
{
home = {
username = "sloane";
homeDirectory = "/Users/sloane";
stateVersion = "23.11";
packages = with pkgs; [
jq
zoxide
yadm
devenv
watchman
2024-04-13 12:56:52 -04:00
fd
2024-04-24 10:11:46 -04:00
wget
2024-03-29 20:49:45 -04:00
];
sessionVariables = {
EDITOR = "nvim";
KERL_CONFIGURE_OPTIONS="--with-ssl=/opt/homebrew/opt/openssl@3";
};
};
programs.fish = {
enable = true;
interactiveShellInit = ''
fish_vi_key_bindings
zoxide init fish | source
if not set -q TMUX
set -g TMUX tmux new-session -d -s default
eval $TMUX
tmux attach-session -d -t default
end
'';
shellInitLast = ''
if test -d /opt/homebrew
/opt/homebrew/bin/brew shellenv | source
end
mise activate fish | source
'';
plugins = [
{
name = "hydro";
src = pkgs.fetchFromGitHub {
owner = "jorgebucaran";
repo = "hydro";
rev = "41b46a05c84a15fe391b9d43ecb71c7a243b5703";
hash = "sha256-zmEa/GJ9jtjzeyJUWVNSz/wYrU2FtqhcHdgxzi6ANHg=";
};
}
];
shellAbbrs = {
vim = "nvim";
cat = "bat";
2024-04-06 08:33:31 -04:00
drs = "darwin-rebuild switch --flake ~/.config/nix-darwin";
2024-03-29 20:49:45 -04:00
# git
g = "git";
ga = "git add";
gb = "git branch";
gc = "git commit";
gcb = "git checkout -b";
gco = "git checkout";
gd = "git diff";
gf = "git fetch";
gp = "git push";
gP = "git push --force-with-lease";
gpl = "git pull";
gplr = "git pull --rebase ";
gr = "git rebase";
grr = "git rebase --continue";
gst = "git status";
gca = "git commit -a";
};
};
programs.git = {
enable = true;
userName = "sloane";
userEmail = "1699281+sloanelybutsurely@users.noreply.github.com";
signing = {
signByDefault = true;
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID0TH2GezEx8+zlKBqUb7rBsbmghnd1u4nX6YpQr28Zw";
};
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
gpg = {
format = "ssh";
ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
};
};
};
programs.jujutsu = {
enable = true;
settings = {
core.fsmonitor = "watchman";
2024-03-29 20:49:45 -04:00
user = {
name = "sloane";
email = "1699281+sloanelybutsurely@users.noreply.github.com";
};
signing = {
sign-all = true;
backend = "ssh";
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID0TH2GezEx8+zlKBqUb7rBsbmghnd1u4nX6YpQr28Zw";
backends.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
};
ui.paginate = "never";
};
};
programs.ssh = {
enable = true;
matchBlocks = {
"*" = {
extraOptions.IdentityAgent = ''"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"'';
};
};
};
programs.tmux = {
enable = true;
keyMode = "vi";
shortcut = "a";
extraConfig = ''
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
'';
plugins = with pkgs.tmuxPlugins; [
sensible
prefix-highlight
vim-tmux-navigator
{
plugin = catppuccin;
2024-04-06 08:36:55 -04:00
extraConfig = "set -g @catppuccin_flavour 'mocha'";
2024-03-29 20:49:45 -04:00
}
];
};
programs.home-manager.enable = true;
programs.mise = {
enable = true;
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs.kitty = {
enable = true;
font = {
2024-04-04 10:09:37 -04:00
name = "RecMonoCasual Nerd Font Mono";
2024-04-04 08:53:03 -04:00
size = 16;
2024-03-29 20:49:45 -04:00
};
settings = {
confirm_os_window_close = 0;
paste_actions = "quote-urls-at-prompt,confirm-if-large";
};
2024-04-06 08:36:55 -04:00
theme = "Catppuccin-Mocha";
2024-03-29 20:49:45 -04:00
};
programs.bat.enable = true;
programs.eza ={
enable = true;
git = true;
icons = true;
enableFishIntegration = true;
extraOptions = [
"--group-directories-first"
"--header"
];
};
programs.fzf.enable = true;
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
programs.ripgrep = {
enable = true;
arguments = [];
};
}