Compare commits

...

7 commits

13 changed files with 101 additions and 16 deletions

View file

@ -40,6 +40,7 @@
(defalias 'yes-or-no-p 'y-or-n-p)
(display-battery-mode)
(display-time-mode)
(global-visual-line-mode)
(load "lilypond-init.el")
(prefer-coding-system 'utf-8)
(progn (which-key-mode) (with-eval-after-load 'diminish (diminish 'which-key-mode)))
@ -164,6 +165,11 @@
(ivy-mode 1)
(ivy-count-format "(%d/%d) "))
(use-package markdown
:ensure nil
:bind (:map markdown-ts-mode-map
("C-c C-v" . markdown-preview)))
(use-package org
:ensure nil
:bind (("C-c l" . org-store-link)
@ -364,7 +370,6 @@
:hook
;; keep-sorted start
(gptel-mode . gptel-highlight-mode)
(gptel-mode . visual-line-mode)
(gptel-post-response . gptel-end-of-response)
(gptel-post-stream . gptel-auto-scroll)
;; keep-sorted end

View file

@ -14,10 +14,9 @@ DEB_PKGS=(
bluez
borgbackup
build-essential
cargo
cargo-doc
catatonit
curl
default-jdk
direnv
emacs-mozc
eza
@ -72,8 +71,6 @@ DEB_PKGS=(
ripgrep
rr
rsync
rust-doc
rust-llvm
shellcheck
slurp
speedtest-cli

View file

@ -0,0 +1,11 @@
#! /usr/bin/bash
set -euo pipefail
IFS=$'\n\t'
tmpfile="$(mktemp)"
curl --fail --proto '=https' --show-error --silent --tlsv1.2 --output "${tmpfile}" https://sh.rustup.rs && \
sh "${tmpfile}" --no-modify-path -y && \
chmod o-rwx ~/.cargo/bin/*
rm "${tmpfile}" && \
rustup component add llvm-tools

View file

@ -9,7 +9,7 @@ mkdir --parents "${STATE_DIR}"
github_update() {
package="$1"
repo="$2"
resource="$3"
resource_selector="$3"
post_fetch="$4"
response=$(curl --silent "https://api.github.com/repos/${repo}/releases/latest")
@ -31,6 +31,9 @@ github_update() {
fi
if [ "${install}" = "true" ]; then
echo "\"${latest_version}\""
resource=$(${resource_selector} "${latest_version}")
echo "\"${resource}\""
asset=$(printf '%s' "${response}" | jq --raw-output ".assets[] | select(.name == \"${resource}\").browser_download_url")
curl --location "${asset}" | "${post_fetch}" && \
echo "${latest_version}" > "${VERSION_FILE}" && \

View file

@ -22,3 +22,16 @@ else
cd "$(systemd-path user-state-private)" || exit
git clone https://github.com/simonthum/git-sync
fi
REPO_DIR="$(systemd-path user-state-private)"/tla-bin
if [ -d "${REPO_DIR}" ]
then
git -C "${REPO_DIR}" pull || true
else
cd "$(systemd-path user-state-private)" || exit
git clone https://github.com/pmer/tla-bin
fi
cd "${REPO_DIR}" && \
./download_or_update_tla.sh && \
./install.sh "$(systemd-path user-shared)"/tla-bin && \
chmod --recursive o-rwx "$(systemd-path user-shared)"/tla-bin

View file

@ -14,6 +14,11 @@ emacs_update() {
emacsclient --alternate-editor "" --reuse-frame --eval "(elpaca-pull-all t)" --no-wait > /dev/null
}
rustup_update() {
echo Updating the rustup toolchain...
rustup update
}
cargo_update() {
# shellcheck disable=SC2046
cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1)
@ -38,6 +43,7 @@ podman_update() {
apt_update
emacs_update
rustup_update
uv_update
cargo_update
ghup

View file

@ -5,11 +5,14 @@ IFS=$'\n\t'
package=dolt
repo=dolthub/dolt
resource=dolt-linux-amd64.tar.gz
dolt_resource() {
echo "dolt-linux-amd64.tar.gz"
}
install_dolt() {
tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt
chmod 550 "$(systemd-path user-binaries)"/dolt
}
github_update "${package}" "${repo}" "${resource}" install_dolt
github_update "${package}" "${repo}" dolt_resource install_dolt

View file

@ -0,0 +1,26 @@
#! /usr/bin/bash
set -euo pipefail
IFS=$'\n\t'
package=fstar
repo=FStarLang/FStar
fstar_resource() {
version="$(printf '%s' "$1" | cut --delimiter ' ' --field 2)"
echo "fstar-${version}-Linux-x86_64.tar.gz"
}
INSTALL_DIR="$(systemd-path user-state-private)"/fstar
install_fstar() {
tempdir="$(mktemp --directory)" && \
tar xz --directory="${tempdir}" && \
chmod --recursive o-rwx "${tempdir}" && \
rm --force --recursive "${INSTALL_DIR}" && \
mv "${tempdir}"/fstar "$(dirname "${INSTALL_DIR}")" && \
rm --force --recursive "${tempdir}" && \
ln --symbolic "${INSTALL_DIR}"/bin/fstar.exe "$(systemd-path user-binaries)"/fstar.exe
}
github_update "${package}" "${repo}" fstar_resource install_fstar

View file

@ -5,11 +5,14 @@ IFS=$'\n\t'
package=kingfisher
repo=mongodb/kingfisher
resource=kingfisher-linux-x64.tgz
kingfisher_resource() {
echo "kingfisher-linux-x64.tgz"
}
install_kingfisher() {
tar xz --directory="$(systemd-path user-binaries)" kingfisher
chmod 550 "$(systemd-path user-binaries)"/kingfisher
}
github_update "${package}" "${repo}" "${resource}" install_kingfisher
github_update "${package}" "${repo}" kingfisher_resource install_kingfisher

View file

@ -5,7 +5,10 @@ IFS=$'\n\t'
package=minikube
repo=kubernetes/minikube
resource=minikube-linux-amd64
minikube_resource() {
echo "minikube-linux-amd64"
}
install_minikube() {
tempfile="$(mktemp)"
@ -14,4 +17,4 @@ install_minikube() {
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
}
github_update "${package}" "${repo}" "${resource}" install_minikube
github_update "${package}" "${repo}" minikube_resource install_minikube

View file

@ -5,7 +5,10 @@ IFS=$'\n\t'
package=rust-analyzer
repo=rust-lang/rust-analyzer
resource=rust-analyzer-x86_64-unknown-linux-gnu.gz
rust_analyzer_resource() {
echo "rust-analyzer-x86_64-unknown-linux-gnu.gz"
}
install_rust_analyzer() {
tempfile="$(mktemp)"
@ -14,4 +17,4 @@ install_rust_analyzer() {
mv "${tempfile}" "$(systemd-path user-binaries)"/rust-analyzer
}
github_update "${package}" "${repo}" "${resource}" install_rust_analyzer
github_update "${package}" "${repo}" rust_analyzer_resource install_rust_analyzer

View file

@ -5,7 +5,10 @@ IFS=$'\n\t'
package=uv
repo=astral-sh/uv
resource=uv-x86_64-unknown-linux-gnu.tar.gz
uv_resource() {
echo "uv-x86_64-unknown-linux-gnu.tar.gz"
}
install_uv() {
tempdir="$(mktemp --directory)"
@ -14,4 +17,4 @@ install_uv() {
mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)"
}
github_update "${package}" "${repo}" "${resource}" install_uv
github_update "${package}" "${repo}" uv_resource install_uv

View file

@ -21,6 +21,11 @@ if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# Hook up Rust
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
fi
if [ -d "$HOME/.cargo/bin" ] ; then
PATH="$HOME/.cargo/bin:$PATH"
fi
@ -34,6 +39,10 @@ if [ -d "$(go env GOBIN)" ] ; then
PATH="$(go env GOBIN):$PATH"
fi
if [ -d "$(systemd-path user-shared)"/tla-bin/bin ] ; then
PATH="$(systemd-path user-shared)/tla-bin/bin:$PATH"
fi
# Install the git-sync script
if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then
PATH="$(systemd-path user-state-private)/git-sync:$PATH"