238 lines
4.7 KiB
Nix
238 lines
4.7 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
username = "lcech";
|
|
homedir = "/Users/${username}";
|
|
|
|
zshSourceDirs = [ ];
|
|
|
|
in
|
|
{
|
|
imports = [
|
|
(import ./veracode/aws-cli.nix {
|
|
inherit homedir lib pkgs;
|
|
})
|
|
(import ./nix-init-scripts.nix {
|
|
inherit lib pkgs;
|
|
})
|
|
];
|
|
|
|
home.username = username;
|
|
|
|
home.homeDirectory = homedir;
|
|
|
|
home.stateVersion = "24.11";
|
|
|
|
home.packages = with pkgs; [
|
|
awscli2
|
|
hammerspoon
|
|
k9s
|
|
kubectl
|
|
nixd
|
|
pstree
|
|
watch
|
|
colima
|
|
docker
|
|
];
|
|
|
|
# ghostty marked as broken as of 2025-01-05 in nix, using homebrew and custom config
|
|
home.file = {
|
|
"${homedir}/Library/Application Support/com.mitchellh.ghostty/config" = {
|
|
text = ''
|
|
theme = "catppuccin-mocha"
|
|
font-size = 14
|
|
window-width = 9999
|
|
window-height = 9999
|
|
|
|
# unbind resize split
|
|
keybind = super+ctrl+down=unbind
|
|
keybind = super+ctrl+left=unbind
|
|
keybind = super+ctrl+up=unbind
|
|
keybind = super+ctrl+right=unbind
|
|
|
|
# unbind clear_window
|
|
keybind = super+k=unbind
|
|
|
|
# unbind goto split
|
|
keybind = super+alt+right=unbind
|
|
keybind = super+alt+down=unbind
|
|
keybind = super+alt+left=unbind
|
|
keybind = super+alt+up=unbind
|
|
|
|
keybind = super+k=new_split:down
|
|
keybind = super+l=new_split:right
|
|
|
|
keybind = super+ctrl+j=goto_split:top
|
|
keybind = super+ctrl+k=goto_split:bottom
|
|
keybind = super+ctrl+h=goto_split:left
|
|
keybind = super+ctrl+l=goto_split:right
|
|
|
|
keybind = super+shift+j=resize_split:up,10
|
|
keybind = super+shift+k=resize_split:down,10
|
|
keybind = super+shift+h=resize_split:left,10
|
|
keybind = super+shift+l=resize_split:right,10
|
|
'';
|
|
};
|
|
"${homedir}/.hammerspoon/init.lua" = {
|
|
text = ''
|
|
${builtins.readFile ./hammerspoon/window-tiling.lua}
|
|
'';
|
|
};
|
|
};
|
|
|
|
programs.direnv = {
|
|
enable = true;
|
|
nix-direnv.enable = true;
|
|
};
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "Lukas Cech";
|
|
userEmail = "lcech@veracode.com";
|
|
|
|
ignores = [
|
|
".vscode"
|
|
".direnv"
|
|
".devenv"
|
|
".envrc"
|
|
];
|
|
|
|
extraConfig = {
|
|
core = {
|
|
autocrlf = "input";
|
|
editor = "vim";
|
|
};
|
|
|
|
pull.rebase = false;
|
|
|
|
init.defaultBranch = "main";
|
|
};
|
|
};
|
|
|
|
programs.htop = {
|
|
enable = true;
|
|
};
|
|
|
|
programs.jq = {
|
|
enable = true;
|
|
};
|
|
|
|
programs.k9s = {
|
|
enable = true;
|
|
settings = {
|
|
k9s = {
|
|
refreshRate = 2;
|
|
ui = {
|
|
logoless = true;
|
|
headless = true;
|
|
};
|
|
logger = {
|
|
tail = 1000;
|
|
sinceSeconds = 60 * 30;
|
|
fullScreen = true;
|
|
showtime = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.lsd = {
|
|
enable = true;
|
|
enableAliases = true;
|
|
settings = {
|
|
blocks = [
|
|
"permission"
|
|
"user"
|
|
"group"
|
|
"size"
|
|
"date"
|
|
"git"
|
|
"name"
|
|
];
|
|
sorting = {
|
|
dir-grouping = "first";
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.mcfly = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
keyScheme = "vim";
|
|
# TODO: Test
|
|
fuzzySearchFactor = 2;
|
|
|
|
settings = {
|
|
colors = {
|
|
menubar = {
|
|
bg = "black";
|
|
fg = "red";
|
|
};
|
|
darkmode = {
|
|
prompt = "cyan";
|
|
timing = "yellow";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.pay-respects = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
dirHashes = {
|
|
mac = "${homedir}/storage/.macshare";
|
|
nix = "${homedir}/.config/nix";
|
|
vc = "${homedir}/projects/veracode";
|
|
};
|
|
|
|
shellAliases = {
|
|
hammerspoon-config = "open -a ${pkgs.hammerspoon}/Applications/Hammerspoon.app/Contents/MacOS/Hammerspoon";
|
|
};
|
|
|
|
initExtra = ''
|
|
${builtins.concatStringsSep "\n" (
|
|
builtins.map (dir: ''
|
|
for file in ${dir}/*.zsh; do
|
|
source "$file"
|
|
done
|
|
'') zshSourceDirs
|
|
)}
|
|
|
|
autoload -U +X bashcompinit && bashcompinit
|
|
|
|
source <(${pkgs.kubectl}/bin/kubectl completion zsh)
|
|
complete -C '${pkgs.awscli2}/bin/aws_completer' aws
|
|
|
|
bindkey '^[[3~' delete-char
|
|
'';
|
|
};
|
|
|
|
home.sessionVariables = {
|
|
EDITOR = "vim";
|
|
GO111MODULE = "on";
|
|
TERMINAL = "ghostty";
|
|
};
|
|
|
|
launchd.agents.keepass-sync = {
|
|
enable = true;
|
|
config = {
|
|
Program = /bin/cp;
|
|
ProgramArguments = [
|
|
"${homedir}/storage/.macshare/.secret/arnie.kdbx"
|
|
"${homedir}/arnie.kdbx"
|
|
];
|
|
StartInterval = 60 * 10;
|
|
StandardErrorPath = "/var/log/keepass-sync.error.log";
|
|
StandardOutPath = "/var/log/keepass-sync.out.log";
|
|
};
|
|
};
|
|
}
|