add hydrogen config
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
{ config, pkgs, ... }: {
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.username = "mbessette";
|
||||
home.homeDirectory = "/Users/mbessette";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Dev Specs
|
||||
python3
|
||||
pipenv
|
||||
nodejs_22
|
||||
];
|
||||
|
||||
# Enable direnv for automatic environment switching
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true; # Better Nix flakes integration with caching
|
||||
};
|
||||
|
||||
# Managed VS Code Extensions (The "Clean" Way)
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
userSettings = builtins.fromJSON (builtins.readFile ./config.vscode.settings.json);
|
||||
extensions = with pkgs.vscode-marketplace; [
|
||||
biomejs.biome
|
||||
bbenoist.nix
|
||||
eamodio.gitlens
|
||||
github.copilot-chat
|
||||
graphql.vscode-graphql-syntax
|
||||
hashicorp.terraform
|
||||
mechatroner.rainbow-csv
|
||||
mermaidchart.vscode-mermaid-chart
|
||||
ms-python.debugpy
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
oxc.oxc-vscode
|
||||
redhat.vscode-xml
|
||||
vscode-icons-team.vscode-icons
|
||||
typescriptteam.native-preview
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Automatically load the 1Password agent in your shell
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh.enable = true;
|
||||
oh-my-zsh.theme = "robbyrussell";
|
||||
oh-my-zsh.plugins = [
|
||||
"git"
|
||||
"npm"
|
||||
];
|
||||
|
||||
initContent = ''
|
||||
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BU8OCWD5C.com.1password/t/agent.sock
|
||||
|
||||
# Auto-allow direnv for directories with flake.nix
|
||||
auto_allow_direnv() {
|
||||
if [[ -f flake.nix ]] && [[ ! -f .envrc ]]; then
|
||||
echo "use flake" > .envrc
|
||||
direnv allow
|
||||
elif [[ -f flake.nix ]] && [[ -f .envrc ]]; then
|
||||
direnv allow
|
||||
fi
|
||||
}
|
||||
|
||||
# Run auto-allow when changing directories
|
||||
chpwd_functions+=(auto_allow_direnv)
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
update = "sudo darwin-rebuild switch --flake ~/nixos#hydrogen";
|
||||
laws = "aws --endpoint=http://localhost:4566";
|
||||
dev = "nix develop -c $SHELL";
|
||||
nixos = "code ~/nixos";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
# Points to the Homebrew location mentioned in your caveat
|
||||
NPM_CONFIG_PREFIX = "${config.home.homeDirectory}/.npm-global";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"${config.home.homeDirectory}/.npm-global/bin"
|
||||
];
|
||||
|
||||
home.file.".npmrc".text = ''
|
||||
prefix=${config.home.homeDirectory}/.npm-global
|
||||
'' ;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings.user = {
|
||||
name = "Matthew Bessette";
|
||||
email = "bessette.matthew94@gmail.com";
|
||||
};
|
||||
|
||||
settings.init.defaultBranch = "main";
|
||||
|
||||
# This creates ~/.config/git/ignore and sets core.excludesFile
|
||||
ignores = [
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user