nixconf/modules/features/layers/development.nix
2026-03-28 18:35:54 -05:00

85 lines
2.1 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ self, inputs, ... }:
{
flake.nixosModules.development =
{ pkgs, lib, ... }:
{
config = {
environment.systemPackages = with pkgs; [
vim
git
zed-editor
opencode
direnv
nix-direnv
];
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
enable = true;
# Nice features
enableCompletion = true;
enableAutosuggestions = true;
syntaxHighlighting.enable = true;
# Optional prompt theme — Powerlevel10k is very popular
oh-my-zsh = {
enable = true;
plugins = [
"git"
"direnv"
"z"
];
theme = "robbyrussell"; # or try "agnoster"
};
# HISTORY
histSize = 10000;
# Extra config (this is appended at the end of .zshrc)
promptInit = ''
# Aliases
alias ll="ls -alF"
# Load nix-direnv if available
if command -v direnv >/dev/null; then
eval "$(direnv hook zsh)"
fi
# Better Ctrl-R incremental search
bindkey '^R' history-incremental-search-backward
# Improve cd: automatically pushd to track dirs
setopt auto_pushd
setopt pushd_ignore_dups
# Enable command correction
setopt correct
'';
};
# Configure starship prompt
programs.starship = {
enable = true;
# enableZshIntegration = true;
settings = {
add_newline = false;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
directory.truncate_to_repo = false;
nix_shell = {
disabled = false;
symbol = " ";
format = "[$symbol$name]($style) ";
};
git_branch.symbol = "🌿 ";
};
};
};
};
}