From afa2d0ae80095d979f598bce70d42df6fcb17d65 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Wed, 18 Feb 2026 01:47:09 +0100 Subject: [PATCH 1/4] build: migrate from make to just --- .tool-versions | 1 + Makefile | 74 -------------------------------------------------- justfile | 66 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 74 deletions(-) delete mode 100644 Makefile create mode 100644 justfile diff --git a/.tool-versions b/.tool-versions index a3143e4..9854bbd 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1,2 @@ pre-commit 4.1.0 +just 1.46.0 diff --git a/Makefile b/Makefile deleted file mode 100644 index 11a8b6a..0000000 --- a/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -.DEFAULT_GOAL = help - -DS_NIX_INSTALLER_VERSION := "v0.32.2" - -##============================================================================= -##@ Nix -##============================================================================= - -nix-install: ## Install Nix with Determinate Systems Nix Installer - @echo "Installing Nix using Determinate Systems installer (${DS_NIX_INSTALLER_VERSION})." - @if command -v nix >/dev/null 2>&1; then echo "Nix is already installed. Run 'nix --version' to check version." && exit 0; else \ - curl --proto '=https' --tlsv1.2 -sSf -L "https://install.determinate.systems/nix/tag/${DS_NIX_INSTALLER_VERSION}" | sh -s -- install && \ - echo "Nix installation complete. Please restart your shell."; \ - fi -.PHONY: nix-install - -nix-upgrade: ## Upgrade Nix - @echo "Upgrading Nix." - @sudo -i nix upgrade-nix -.PHONY: nix-upgrade - -nix-uninstall: ## Uninstall Nix - @echo "Uninstalling Nix." - @/nix/nix-installer uninstall -.PHONY: nix-uninstall - -nix-darwin-apply-%: ## Apply nix-darwin configuration - @echo "Applying nix-darwin configuration for $*" - @nix run nix-darwin -- switch --flake .#$* --show-trace - -nix-update-flake: ## Update the flake.lock file - @nix flake update -.PHONY: nix-update-flake - -nix-garbage-collect: ## Collect Nix garbage (remove unused packages) - @nix-collect-garbage -.PHONY: nix-garbage-collect - -##============================================================================= -##@ Misc -##============================================================================= - -pre-commit-init: ## Initialize pre-commit hooks - @echo "Installing pre-commit hooks." - @pre-commit install - @pre-commit install --hook-type commit-msg -.PHONY: pre-commit-init - -pre-commit-autoupdate: ## Update pre-commit hooks - @pre-commit autoupdate -.PHONY: pre-commit-autoupdate - -pre-commit-run-all: ## Run pre-commit hooks on all files - @pre-commit run --all-files -.PHONY: pre-commit-run-all - -asdf-install: ## Install asdf plugins - @./users/shared/scripts/asdf.sh -.PHONY: asdf-install - -##============================================================================= -##@ Helper -##============================================================================= - -help: ## Display help - @awk 'BEGIN {FS = ":.*##"; \ - printf "\nUsage:\n make \033[36m\033[0m\n\n"} \ - /^[a-zA-Z0-9_-]+%?:.*?##/ { \ - printf " \033[36m%-30s\033[0m %s\n", $$1, $$2 \ - } \ - /^##@/ { \ - printf "\n\033[1m%s\033[0m\n", substr($$0, 5) \ - }' $(MAKEFILE_LIST) -.PHONY: help diff --git a/justfile b/justfile new file mode 100644 index 0000000..fe67438 --- /dev/null +++ b/justfile @@ -0,0 +1,66 @@ +[private] +default: + @just --list --unsorted --list-heading $'Available commands:\n' + +DS_NIX_INSTALLER_VERSION := "v0.32.2" + +[group('nix')] +[doc('Install Nix with Determinate Systems Nix Installer')] +nix-install: + @echo "Installing Nix using Determinate Systems installer ({{ DS_NIX_INSTALLER_VERSION }})." + @if command -v nix >/dev/null 2>&1; then \ + echo "Nix is already installed. Run 'nix --version' to check version."; \ + else \ + curl --proto '=https' --tlsv1.2 -sSf -L "https://install.determinate.systems/nix/tag/{{ DS_NIX_INSTALLER_VERSION }}" | sh -s -- install && \ + echo "Nix installation complete. Please restart your shell."; \ + fi + +[group('nix')] +[doc('Upgrade Nix')] +nix-upgrade: + @echo "Upgrading Nix." + @sudo -i nix upgrade-nix + +[group('nix')] +[doc('Uninstall Nix')] +nix-uninstall: + @echo "Uninstalling Nix." + @/nix/nix-installer uninstall + +[group('nix')] +[doc('Apply nix-darwin configuration for a given host')] +nix-apply host: + @echo "Applying nix-darwin configuration for {{ host }}." + @nix run nix-darwin -- switch --flake .#{{ host }} --show-trace + +[group('nix')] +[doc('Update the flake.lock file')] +nix-update-flake: + @nix flake update + +[group('nix')] +[doc('Collect Nix garbage (remove unused packages)')] +nix-gc: + @nix-collect-garbage + +[group('misc')] +[doc('Initialize pre-commit hooks')] +pre-commit-init: + @echo "Installing pre-commit hooks." + @pre-commit install + @pre-commit install --hook-type commit-msg + +[group('misc')] +[doc('Update pre-commit hooks')] +pre-commit-update: + @pre-commit autoupdate + +[group('misc')] +[doc('Run pre-commit hooks on all files')] +pre-commit-run: + @pre-commit run --all-files + +[group('misc')] +[doc('Install asdf plugins')] +asdf-install: + @./users/shared/scripts/asdf.sh From 7c1db0403225cdb95520fcce12dec05d35795195 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Wed, 18 Feb 2026 01:52:15 +0100 Subject: [PATCH 2/4] chore: update aws config --- .gitignore | 1 + users/gkhaykin/awscli.nix | 42 --------------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 users/gkhaykin/awscli.nix diff --git a/.gitignore b/.gitignore index e43b0f9..ebed9a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +users/gkhaykin/awscli.nix diff --git a/users/gkhaykin/awscli.nix b/users/gkhaykin/awscli.nix deleted file mode 100644 index 4f4e15f..0000000 --- a/users/gkhaykin/awscli.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ ... }: { - programs.zsh = { - initContent = '' - # >>> AWS - export AWS_SDK_LOAD_CONFIG=1 - # <<< AWS - ''; - }; - programs.awscli = { - enable = true; - settings = { - default = { - region = "us-west-2"; - output = "json"; - }; - "sso-session together" = { - sso_start_url = "https://together-aws-portal.awsapps.com/start"; - sso_region = "us-west-2"; - }; - "profile together-prod" = { - sso_session = "together"; - sso_account_id = "598726163780"; - sso_role_name = "PowerUserAccess"; - }; - "profile together-qa" = { - sso_session = "together"; - sso_account_id = "905418226616"; - sso_role_name = "PowerUserAccess"; - }; - "profile together-research" = { - sso_session = "together"; - sso_account_id = "805380815601"; - sso_role_name = "PowerUserAccess"; - }; - "profile together-dev" = { - sso_session = "together"; - sso_account_id = "997151384078"; - sso_role_name = "PowerUserAccess"; - }; - }; - }; -} From 05d490c56e51ff928c05d1daba6c4aa66d3d1317 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Wed, 18 Feb 2026 01:52:43 +0100 Subject: [PATCH 3/4] build(asdf): update golang, add buf and just --- users/shared/scripts/asdf.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/users/shared/scripts/asdf.sh b/users/shared/scripts/asdf.sh index e4a9162..6d04f69 100755 --- a/users/shared/scripts/asdf.sh +++ b/users/shared/scripts/asdf.sh @@ -13,7 +13,7 @@ plugins=( "python 3.12.9" # programming language "uv 0.8.13" # python package manager "rust 1.84.1" # programming language - "golang 1.23.5" # programming language + "golang 1.25.5" # programming language "terraform 1.12.1" # IaC provisioning "opentofu 1.9.0" # fork of terraform since license changed "tflint 0.55.1" # terraform linter @@ -41,7 +41,8 @@ plugins=( "pre-commit 4.3.0" # git commit hook manager "direnv 2.35.0" # environment manager "1password-cli 2.30.3" # password manager - # "make 4.4.1" + "buf 1.61.0" # protobuf tooling + "just 1.46.0" # building tool, alternative to make ) asdf plugin add supabase-cli https://github.com/gavinying/asdf-supabase-cli.git 2>/dev/null || true for plugin in "${plugins[@]}"; do From 0962022cb3b4bb5de4f723f7f59135ad2de5ebfc Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Wed, 18 Feb 2026 02:21:00 +0100 Subject: [PATCH 4/4] style: :art: --- .pre-commit-config.yaml | 1 + .releaserc | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f90bd9..bbc05a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,3 +24,4 @@ repos: rev: v1.3.0 hooks: - id: nixpkgs-fmt + language: system diff --git a/.releaserc b/.releaserc index 7176fa0..ece834f 100644 --- a/.releaserc +++ b/.releaserc @@ -34,14 +34,38 @@ "presetConfig": { "header": "CHANGELOG", "types": [ - { "type": "feat", "section": "Features" }, - { "type": "BREAKING CHANGE", "section": "Breaking Changes" }, - { "type": "feat!", "section": "Breaking Changes" }, - { "type": "fix", "section": "Bug Fixes" }, - { "type": "perf", "section": "Performance Improvements" }, - { "type": "test", "section": "Tests" }, - { "type": "build", "section": "Build System" }, - { "type": "ci", "section": "CI/CD" } + { + "type": "feat", + "section": "Features" + }, + { + "type": "BREAKING CHANGE", + "section": "Breaking Changes" + }, + { + "type": "feat!", + "section": "Breaking Changes" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "test", + "section": "Tests" + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "CI/CD" + } ] } }