Skip to content

Commit

Permalink
Merge pull request #51 from djgoku/feature/add-devbox
Browse files Browse the repository at this point in the history
Feature/add devbox
  • Loading branch information
djgoku authored May 4, 2024
2 parents b274a98 + d739132 commit c2aded4
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 13 deletions.
18 changes: 18 additions & 0 deletions devbox/devbox.json5
Original file line number Diff line number Diff line change
@@ -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"],
}
}
22 changes: 22 additions & 0 deletions devbox/plugins/development/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
40 changes: 40 additions & 0 deletions devbox/plugins/devops/plugin.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
8 changes: 8 additions & 0 deletions devbox/plugins/emacs/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
5 changes: 1 addition & 4 deletions emacs/config.org
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,10 @@ 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-<left>" . winner-undo)
("M-s-<right>" . winner-redo)))

(elpaca-wait)

(when (file-exists-p (locate-user-emacs-file "custom.el"))
(load custom-file))
#+end_src
16 changes: 7 additions & 9 deletions emacs/init.el
Original file line number Diff line number Diff line change
@@ -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))
Expand All @@ -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))
Expand All @@ -43,8 +45,6 @@
;; Enable use-package :ensure support for Elpaca.
(elpaca-use-package-mode))

(elpaca-wait)

(use-package modus-themes
:ensure t
:custom-face
Expand All @@ -65,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")))

Expand Down

0 comments on commit c2aded4

Please sign in to comment.