Compare commits
7 commits
26bc0cba83
...
f193d626ab
| Author | SHA1 | Date | |
|---|---|---|---|
| f193d626ab | |||
| f7642dc396 | |||
| 049c8854a0 | |||
| 9173b92ea9 | |||
| 0e61f5f32f | |||
| 4cc2af055d | |||
| 378fdeb3f9 |
13 changed files with 101 additions and 16 deletions
|
|
@ -40,6 +40,7 @@
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
(display-battery-mode)
|
(display-battery-mode)
|
||||||
(display-time-mode)
|
(display-time-mode)
|
||||||
|
(global-visual-line-mode)
|
||||||
(load "lilypond-init.el")
|
(load "lilypond-init.el")
|
||||||
(prefer-coding-system 'utf-8)
|
(prefer-coding-system 'utf-8)
|
||||||
(progn (which-key-mode) (with-eval-after-load 'diminish (diminish 'which-key-mode)))
|
(progn (which-key-mode) (with-eval-after-load 'diminish (diminish 'which-key-mode)))
|
||||||
|
|
@ -164,6 +165,11 @@
|
||||||
(ivy-mode 1)
|
(ivy-mode 1)
|
||||||
(ivy-count-format "(%d/%d) "))
|
(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
|
(use-package org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind (("C-c l" . org-store-link)
|
:bind (("C-c l" . org-store-link)
|
||||||
|
|
@ -364,7 +370,6 @@
|
||||||
:hook
|
:hook
|
||||||
;; keep-sorted start
|
;; keep-sorted start
|
||||||
(gptel-mode . gptel-highlight-mode)
|
(gptel-mode . gptel-highlight-mode)
|
||||||
(gptel-mode . visual-line-mode)
|
|
||||||
(gptel-post-response . gptel-end-of-response)
|
(gptel-post-response . gptel-end-of-response)
|
||||||
(gptel-post-stream . gptel-auto-scroll)
|
(gptel-post-stream . gptel-auto-scroll)
|
||||||
;; keep-sorted end
|
;; keep-sorted end
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,9 @@ DEB_PKGS=(
|
||||||
bluez
|
bluez
|
||||||
borgbackup
|
borgbackup
|
||||||
build-essential
|
build-essential
|
||||||
cargo
|
|
||||||
cargo-doc
|
|
||||||
catatonit
|
catatonit
|
||||||
curl
|
curl
|
||||||
|
default-jdk
|
||||||
direnv
|
direnv
|
||||||
emacs-mozc
|
emacs-mozc
|
||||||
eza
|
eza
|
||||||
|
|
@ -72,8 +71,6 @@ DEB_PKGS=(
|
||||||
ripgrep
|
ripgrep
|
||||||
rr
|
rr
|
||||||
rsync
|
rsync
|
||||||
rust-doc
|
|
||||||
rust-llvm
|
|
||||||
shellcheck
|
shellcheck
|
||||||
slurp
|
slurp
|
||||||
speedtest-cli
|
speedtest-cli
|
||||||
|
|
|
||||||
11
.config/setup/06-install-rust-toolchain.sh
Executable file
11
.config/setup/06-install-rust-toolchain.sh
Executable 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
|
||||||
|
|
@ -9,7 +9,7 @@ mkdir --parents "${STATE_DIR}"
|
||||||
github_update() {
|
github_update() {
|
||||||
package="$1"
|
package="$1"
|
||||||
repo="$2"
|
repo="$2"
|
||||||
resource="$3"
|
resource_selector="$3"
|
||||||
post_fetch="$4"
|
post_fetch="$4"
|
||||||
|
|
||||||
response=$(curl --silent "https://api.github.com/repos/${repo}/releases/latest")
|
response=$(curl --silent "https://api.github.com/repos/${repo}/releases/latest")
|
||||||
|
|
@ -31,6 +31,9 @@ github_update() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${install}" = "true" ]; then
|
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")
|
asset=$(printf '%s' "${response}" | jq --raw-output ".assets[] | select(.name == \"${resource}\").browser_download_url")
|
||||||
curl --location "${asset}" | "${post_fetch}" && \
|
curl --location "${asset}" | "${post_fetch}" && \
|
||||||
echo "${latest_version}" > "${VERSION_FILE}" && \
|
echo "${latest_version}" > "${VERSION_FILE}" && \
|
||||||
|
|
|
||||||
|
|
@ -22,3 +22,16 @@ else
|
||||||
cd "$(systemd-path user-state-private)" || exit
|
cd "$(systemd-path user-state-private)" || exit
|
||||||
git clone https://github.com/simonthum/git-sync
|
git clone https://github.com/simonthum/git-sync
|
||||||
fi
|
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
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ emacs_update() {
|
||||||
emacsclient --alternate-editor "" --reuse-frame --eval "(elpaca-pull-all t)" --no-wait > /dev/null
|
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() {
|
cargo_update() {
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1)
|
cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1)
|
||||||
|
|
@ -38,6 +43,7 @@ podman_update() {
|
||||||
|
|
||||||
apt_update
|
apt_update
|
||||||
emacs_update
|
emacs_update
|
||||||
|
rustup_update
|
||||||
uv_update
|
uv_update
|
||||||
cargo_update
|
cargo_update
|
||||||
ghup
|
ghup
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,14 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
package=dolt
|
package=dolt
|
||||||
repo=dolthub/dolt
|
repo=dolthub/dolt
|
||||||
resource=dolt-linux-amd64.tar.gz
|
|
||||||
|
dolt_resource() {
|
||||||
|
echo "dolt-linux-amd64.tar.gz"
|
||||||
|
}
|
||||||
|
|
||||||
install_dolt() {
|
install_dolt() {
|
||||||
tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt
|
tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt
|
||||||
chmod 550 "$(systemd-path user-binaries)"/dolt
|
chmod 550 "$(systemd-path user-binaries)"/dolt
|
||||||
}
|
}
|
||||||
|
|
||||||
github_update "${package}" "${repo}" "${resource}" install_dolt
|
github_update "${package}" "${repo}" dolt_resource install_dolt
|
||||||
|
|
|
||||||
26
.local/share/github-versions/fstar
Executable file
26
.local/share/github-versions/fstar
Executable 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
|
||||||
|
|
@ -5,11 +5,14 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
package=kingfisher
|
package=kingfisher
|
||||||
repo=mongodb/kingfisher
|
repo=mongodb/kingfisher
|
||||||
resource=kingfisher-linux-x64.tgz
|
|
||||||
|
kingfisher_resource() {
|
||||||
|
echo "kingfisher-linux-x64.tgz"
|
||||||
|
}
|
||||||
|
|
||||||
install_kingfisher() {
|
install_kingfisher() {
|
||||||
tar xz --directory="$(systemd-path user-binaries)" kingfisher
|
tar xz --directory="$(systemd-path user-binaries)" kingfisher
|
||||||
chmod 550 "$(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
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
package=minikube
|
package=minikube
|
||||||
repo=kubernetes/minikube
|
repo=kubernetes/minikube
|
||||||
resource=minikube-linux-amd64
|
|
||||||
|
minikube_resource() {
|
||||||
|
echo "minikube-linux-amd64"
|
||||||
|
}
|
||||||
|
|
||||||
install_minikube() {
|
install_minikube() {
|
||||||
tempfile="$(mktemp)"
|
tempfile="$(mktemp)"
|
||||||
|
|
@ -14,4 +17,4 @@ install_minikube() {
|
||||||
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
|
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
|
||||||
}
|
}
|
||||||
|
|
||||||
github_update "${package}" "${repo}" "${resource}" install_minikube
|
github_update "${package}" "${repo}" minikube_resource install_minikube
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
package=rust-analyzer
|
package=rust-analyzer
|
||||||
repo=rust-lang/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() {
|
install_rust_analyzer() {
|
||||||
tempfile="$(mktemp)"
|
tempfile="$(mktemp)"
|
||||||
|
|
@ -14,4 +17,4 @@ install_rust_analyzer() {
|
||||||
mv "${tempfile}" "$(systemd-path user-binaries)"/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
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
package=uv
|
package=uv
|
||||||
repo=astral-sh/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() {
|
install_uv() {
|
||||||
tempdir="$(mktemp --directory)"
|
tempdir="$(mktemp --directory)"
|
||||||
|
|
@ -14,4 +17,4 @@ install_uv() {
|
||||||
mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)"
|
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
|
||||||
|
|
|
||||||
9
.profile
9
.profile
|
|
@ -21,6 +21,11 @@ if [ -d "$HOME/bin" ] ; then
|
||||||
PATH="$HOME/bin:$PATH"
|
PATH="$HOME/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Hook up Rust
|
||||||
|
if [ -f "$HOME/.cargo/env" ]; then
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME/.cargo/bin" ] ; then
|
if [ -d "$HOME/.cargo/bin" ] ; then
|
||||||
PATH="$HOME/.cargo/bin:$PATH"
|
PATH="$HOME/.cargo/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
@ -34,6 +39,10 @@ if [ -d "$(go env GOBIN)" ] ; then
|
||||||
PATH="$(go env GOBIN):$PATH"
|
PATH="$(go env GOBIN):$PATH"
|
||||||
fi
|
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
|
# Install the git-sync script
|
||||||
if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then
|
if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then
|
||||||
PATH="$(systemd-path user-state-private)/git-sync:$PATH"
|
PATH="$(systemd-path user-state-private)/git-sync:$PATH"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue