VSCode life
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
# 1Password SSH Socket
|
||||
environment.variables.SSH_AUTH_SOCK = "~/Library/Group Containers/2BU8OCWD5C.com.1password/t/agent.sock";
|
||||
|
||||
# Set vim as default editor
|
||||
environment.variables.EDITOR = "vim";
|
||||
environment.variables.VISUAL = "vim";
|
||||
environment.variables.GIT_EDITOR = "vim";
|
||||
|
||||
# Add Homebrew to PATH
|
||||
environment.systemPath = [ "/opt/homebrew/bin" "/opt/homebrew/sbin" ];
|
||||
|
||||
system.primaryUser = "matthew.bessette";
|
||||
users.users."matthew.bessette" = {
|
||||
name = "matthew.bessette";
|
||||
@@ -13,11 +21,19 @@
|
||||
};
|
||||
|
||||
# Homebrew for Casks and specific binaries
|
||||
# In a nix-darwin setup, Homebrew packages are not actually stored inside the Nix store.
|
||||
# Instead, nix-darwin acts as a manager that triggers the standard Homebrew installation
|
||||
# process on your macOS system.
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation.cleanup = "uninstall";
|
||||
onActivation.autoUpdate = true;
|
||||
onActivation.upgrade = true;
|
||||
taps = [ "bufbuild/buf" "jacobjohansen/tap" ];
|
||||
brews = [ "jacobjohansen/tap/rds-auth-proxy"];
|
||||
brews = [
|
||||
"biome"
|
||||
"jacobjohansen/tap/rds-auth-proxy"
|
||||
];
|
||||
casks = [
|
||||
"android-commandlinetools"
|
||||
"android-platform-tools"
|
||||
@@ -27,7 +43,6 @@
|
||||
"signal"
|
||||
"spotify"
|
||||
"yubico-yubikey-manager"
|
||||
"visual-studio-code"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -23,22 +23,34 @@
|
||||
buf
|
||||
];
|
||||
|
||||
xdg.configFile."biome.json".source = ../../config/biome.json;
|
||||
|
||||
# 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-extensions; [
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
ms-python.debugpy
|
||||
hashicorp.terraform
|
||||
esbenp.prettier-vscode
|
||||
# graphql.vscode-graphql
|
||||
biomejs.biome
|
||||
bbenoist.nix
|
||||
dbaeumer.vscode-eslint
|
||||
eamodio.gitlens
|
||||
redhat.vscode-xml
|
||||
esbenp.prettier-vscode
|
||||
graphql.vscode-graphql-syntax
|
||||
hashicorp.terraform
|
||||
mechatroner.rainbow-csv
|
||||
bbenoist.nix
|
||||
# Note: Some niche extensions might need to be installed manually in VS Code
|
||||
# mermaidchart.vscode-mermaid-chart
|
||||
ms-python.debugpy
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
redhat.vscode-xml
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -58,6 +70,19 @@
|
||||
|
||||
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 = {
|
||||
|
||||
Reference in New Issue
Block a user