2024-11-17 20:16:01 +00:00
|
|
|
{ pkgs, ... }:
|
2023-03-19 19:23:48 +00:00
|
|
|
|
2024-11-14 11:17:26 +00:00
|
|
|
let
|
2024-11-17 20:16:01 +00:00
|
|
|
commitFunctions = pkgs.writeTextDir "bin/commits.sh" (builtins.readFile ./scripts/commits.sh);
|
2024-11-14 11:17:26 +00:00
|
|
|
in
|
2023-03-19 19:23:48 +00:00
|
|
|
{
|
2023-04-10 19:17:08 +01:00
|
|
|
home.packages = with pkgs; [ any-nix-shell ];
|
|
|
|
|
2021-06-25 12:55:23 +01:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
2024-11-18 19:58:32 +00:00
|
|
|
plugins = [ "git" "sudo" "docker" "docker-compose" "systemd" ];
|
2021-06-25 12:55:23 +01:00
|
|
|
theme = "bira";
|
|
|
|
};
|
2024-06-01 11:41:26 +01:00
|
|
|
autosuggestion.enable = false;
|
2023-06-11 00:31:02 +01:00
|
|
|
dotDir = ".config/zsh";
|
2023-04-10 19:17:08 +01:00
|
|
|
initExtra = ''
|
2023-08-14 13:08:11 +01:00
|
|
|
# avoid macOS updates to destroy nix
|
|
|
|
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
|
|
|
|
source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
|
|
|
fi
|
|
|
|
|
2023-04-10 19:17:08 +01:00
|
|
|
any-nix-shell zsh --info-right | source /dev/stdin
|
2023-06-01 20:09:04 +01:00
|
|
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
2025-01-14 12:15:13 +00:00
|
|
|
${if pkgs.stdenv.isDarwin then "export PATH=/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" else ""}
|
2024-11-14 11:17:26 +00:00
|
|
|
|
2025-03-10 13:48:40 +00:00
|
|
|
recap() { aichat -f "$@" ;}
|
|
|
|
|
2024-11-14 11:17:26 +00:00
|
|
|
source ${commitFunctions}/bin/commits.sh
|
2023-04-10 19:17:08 +01:00
|
|
|
'';
|
|
|
|
};
|
2021-06-25 12:55:23 +01:00
|
|
|
}
|
2023-06-01 20:09:04 +01:00
|
|
|
|