From ccd327a03325a976dc397e96759c1ce36b9dc337 Mon Sep 17 00:00:00 2001 From: Jonathan Carroll Otsuka Date: Sat, 4 May 2024 13:53:56 -0500 Subject: [PATCH 1/4] Adding devbox setup with three plugins * Development is for most coding related python, elixir * emacs is emacs haha. :D * devops is a bunch of devops tooling like terraform, pre-commit --- devbox/devbox.json5 | 18 ++++++++++++ devbox/plugins/development/plugin.json | 22 ++++++++++++++ devbox/plugins/devops/plugin.json | 40 ++++++++++++++++++++++++++ devbox/plugins/emacs/plugin.json | 8 ++++++ 4 files changed, 88 insertions(+) create mode 100644 devbox/devbox.json5 create mode 100644 devbox/plugins/development/plugin.json create mode 100644 devbox/plugins/devops/plugin.json create mode 100644 devbox/plugins/emacs/plugin.json diff --git a/devbox/devbox.json5 b/devbox/devbox.json5 new file mode 100644 index 0000000..213cf01 --- /dev/null +++ b/devbox/devbox.json5 @@ -0,0 +1,18 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox.schema.json", + + "include": [ + // can switch to a branch via github:djgoku/dot-files/a-branch-name/?dir=... + "github:djgoku/dot-files/?dir=devbox/plugins/emacs", + "github:djgoku/dot-files/?dir=devbox/plugins/devops", + "github:djgoku/dot-files/?dir=devbox/plugins/development" + ], + "packages": [], + "env": { + // Install your virtual environment in `.venv` + // "VENV_DIR": ".venv" + }, + "shell": { + // "init_hook": ["python -m venv $VENV_DIR", ". $VENV_DIR/bin/activate"], + } +} diff --git a/devbox/plugins/development/plugin.json b/devbox/plugins/development/plugin.json new file mode 100644 index 0000000..9912ed2 --- /dev/null +++ b/devbox/plugins/development/plugin.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox-plugin.schema.json", + "name": "development", + "packages": [ + "beam.packages.erlang_26.elixir_1_15", + "github:elixir-tools/next-ls/v0.20.2", + "nodePackages.prettier@latest", + "nodePackages.pyright@latest", + "nodePackages.tailwindcss@latest", + "postgresql@latest", + "python311Packages.ipython@latest", + "python311Packages.pipx@latest", + "python311Packages.pudb@latest", + "python311Packages.python-magic@latest", + "python311Packages.python@latest", + "python311Packages.pyyaml@latest", + "python311Packages.requests@latest", + "python311Packages.ruamel_base@latest", + "python311Packages.ruamel_yaml@latest", + "python311Packages.regress@latest" + ] +} diff --git a/devbox/plugins/devops/plugin.json b/devbox/plugins/devops/plugin.json new file mode 100644 index 0000000..e7891ec --- /dev/null +++ b/devbox/plugins/devops/plugin.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox-plugin.schema.json", + "name": "devops", + "packages": { + "awscli2": "latest", + "chkcrontab": "latest", + "colima": "latest", + "curl": "latest", + "detect-secrets": "latest", + "direnv": "latest", + "docker": "latest", + "earthly": "latest", + "entr": "latest", + "gibberish-detector": "latest", + "git": "latest", + "gnupg": "2.3.7", + "go": "latest", + "jq": "latest", + "kubectl": "latest", + "pre-commit": "latest", + "ripgrep": "latest", + "sops": "latest", + "sqlite-interactive": "latest", + "tart": { + "version": "latest", + "excluded_platforms": ["x86_64-linux"] + }, + "terraform": "latest", + "terraform-ls": "latest", + "texlive.combined.scheme-full": "latest", + "tmux": "latest", + "yamlfmt": "latest" + }, + "shell": { + "init_hook": ["echo 'Welcome to devbox!' > /dev/null"], + "scripts": { + "test": ["echo \"Error: no test specified\" && exit 1"] + } + } +} diff --git a/devbox/plugins/emacs/plugin.json b/devbox/plugins/emacs/plugin.json new file mode 100644 index 0000000..4714cd2 --- /dev/null +++ b/devbox/plugins/emacs/plugin.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox-plugin.schema.json", + "name": "emacs", + "packages": [ + "github:nix-community/emacs-overlay/65297336c6db39d94adb8156d811d800b253fded#emacs-git", + "emacsPackages.vterm@latest" + ] +} From 7dbd4af31817529bea7d5997fe519bd51f19e246 Mon Sep 17 00:00:00 2001 From: Jonathan Carroll Otsuka Date: Tue, 2 Apr 2024 18:32:43 -0500 Subject: [PATCH 2/4] Updating init.el to match elpaca/init.el example https://github.com/progfolio/elpaca/blob/master/doc/init.el --- emacs/init.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 880314c..db3d70c 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -1,12 +1,12 @@ ;; Example Elpaca configuration -*- lexical-binding: t; -*- -(setq elpaca-core-date '(20240204)) -(defvar elpaca-installer-version 0.6) +(setq elpaca-core-date '(20240504)) +(defvar elpaca-installer-version 0.7) (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) (defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory)) (defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git" - :ref nil + :ref nil :depth 1 :files (:defaults "elpaca-test.el" (:exclude "extensions")) :build (:not elpaca--activate-package))) (let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory)) @@ -19,8 +19,10 @@ (when (< emacs-major-version 28) (require 'subr-x)) (condition-case-unless-debug err (if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) - ((zerop (call-process "git" nil buffer t "clone" - (plist-get order :repo) repo))) + ((zerop (apply #'call-process `("git" nil ,buffer t "clone" + ,@(when-let ((depth (plist-get order :depth))) + (list (format "--depth=%d" depth) "--no-single-branch")) + ,(plist-get order :repo) ,repo)))) ((zerop (call-process "git" nil buffer t "checkout" (or (plist-get order :ref) "--")))) (emacs (concat invocation-directory invocation-name)) From 872abe06bf497b8db4b6a95bdd2ff06d9bd9e875 Mon Sep 17 00:00:00 2001 From: Jonathan Carroll Otsuka Date: Tue, 2 Apr 2024 19:12:55 -0500 Subject: [PATCH 3/4] Enable `winner-mode` after we finish initializing. --- emacs/config.org | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs/config.org b/emacs/config.org index eafc7fe..e1a0111 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -618,8 +618,7 @@ actually counts the lines and puts the value beside the counted line. :init (setq winner-dont-bind-my-keys t) (setq winner-boring-buffers '("*Completions*" "*Help*" "*Apropos*" "*Buffer List*" "*info*" "*Compile-Log*")) - :config - (winner-mode 1) + :hook (after-init . winner-mode) :bind (("M-s-" . winner-undo) ("M-s-" . winner-redo))) From d739132b652a7a28236463cdfd802b5ee5a19cbb Mon Sep 17 00:00:00 2001 From: Jonathan Carroll Otsuka Date: Sat, 4 May 2024 14:13:13 -0500 Subject: [PATCH 4/4] Removing the use of `(elpaca-wait)` from my config. --- emacs/config.org | 2 -- emacs/init.el | 4 ---- 2 files changed, 6 deletions(-) diff --git a/emacs/config.org b/emacs/config.org index e1a0111..e2e017c 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -622,8 +622,6 @@ actually counts the lines and puts the value beside the counted line. :bind (("M-s-" . winner-undo) ("M-s-" . winner-redo))) -(elpaca-wait) - (when (file-exists-p (locate-user-emacs-file "custom.el")) (load custom-file)) #+end_src diff --git a/emacs/init.el b/emacs/init.el index db3d70c..501a6bd 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -45,8 +45,6 @@ ;; Enable use-package :ensure support for Elpaca. (elpaca-use-package-mode)) -(elpaca-wait) - (use-package modus-themes :ensure t :custom-face @@ -67,8 +65,6 @@ (setq undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" "/git-rebase-todo\\'"))) -(elpaca-wait) - (when (file-readable-p (locate-user-emacs-file "config.org")) (org-babel-load-file (locate-user-emacs-file "config.org")))