Compare commits
8 Commits
880e1376da
...
9724ef1aa2
| Author | SHA1 | Date | |
|---|---|---|---|
| 9724ef1aa2 | |||
| 856e3d33f9 | |||
| 6bd3caf622 | |||
| 49cf283770 | |||
| 561cb4038f | |||
| d98529f30b | |||
| 3e76a82cb2 | |||
| 0147f7f0a9 |
@@ -12,10 +12,11 @@ DOTDIR="/var/lib/dotfiles"
|
|||||||
|
|
||||||
os_release_file=/etc/os-release
|
os_release_file=/etc/os-release
|
||||||
if [[ ! -e "${os_release_file}" ]] ; then
|
if [[ ! -e "${os_release_file}" ]] ; then
|
||||||
2>&1 printf "Could not find ${os_release_file}, exiting"
|
2>&1 printf 'Could not find %, exiting' "${os_release_file}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# shellcheck source=/etc/os-release
|
||||||
source "${os_release_file}"
|
source "${os_release_file}"
|
||||||
|
|
||||||
sudowrap() {
|
sudowrap() {
|
||||||
@@ -37,7 +38,7 @@ install() {
|
|||||||
fi
|
fi
|
||||||
sudowrap pacman -S --needed --noconfirm "${package}"
|
sudowrap pacman -S --needed --noconfirm "${package}"
|
||||||
else
|
else
|
||||||
2>&1 printf "Unsupported distro $NAME, exiting"
|
2>&1 printf 'Unsupported distro %s, exiting' "$NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ pacman -Sy --noconfirm git # yes its a partial upgrade, but thats just the live
|
|||||||
cd /root
|
cd /root
|
||||||
git clone --recursive https://code.hkoerber.de/hannes/dotfiles.git
|
git clone --recursive https://code.hkoerber.de/hannes/dotfiles.git
|
||||||
|
|
||||||
./dotfiles/install_scripts/${host}.sh
|
./dotfiles/install_scripts/"${host}".sh
|
||||||
|
|
||||||
mv /root/dotfiles /mnt/var/lib/dotfiles
|
mv /root/dotfiles /mnt/var/lib/dotfiles
|
||||||
|
|
||||||
read -p "> Ready for reboot. Press enter for shutdown, then remove the installation media and boot again "
|
read -rp "> Ready for reboot. Press enter for shutdown, then remove the installation media and boot again "
|
||||||
|
|
||||||
poweroff
|
poweroff
|
||||||
|
|||||||
38
packages.yml
38
packages.yml
@@ -2,8 +2,17 @@ packages:
|
|||||||
list:
|
list:
|
||||||
kernel:
|
kernel:
|
||||||
archlinux:
|
archlinux:
|
||||||
|
- linux-zen
|
||||||
- linux-zen-headers
|
- linux-zen-headers
|
||||||
- linux-zen-docs
|
- linux-zen-docs
|
||||||
|
- linux-firmware
|
||||||
|
grub:
|
||||||
|
archlinux:
|
||||||
|
- grub
|
||||||
|
- efibootmgr
|
||||||
|
lvm:
|
||||||
|
archlinux:
|
||||||
|
- lvm2
|
||||||
build-essentials:
|
build-essentials:
|
||||||
archlinux:
|
archlinux:
|
||||||
- gcc
|
- gcc
|
||||||
@@ -42,16 +51,15 @@ packages:
|
|||||||
archlinux:
|
archlinux:
|
||||||
- ansible
|
- ansible
|
||||||
- ansible-language-server
|
- ansible-language-server
|
||||||
|
- python-jmespath
|
||||||
xdotool:
|
xdotool:
|
||||||
archlinux: ["xdotool"]
|
archlinux: ["xdotool"]
|
||||||
arandr:
|
arandr:
|
||||||
archlinux: ["arandr"]
|
archlinux: ["arandr"]
|
||||||
borgbackup:
|
|
||||||
archlinux: ["borgbackup"]
|
|
||||||
docker:
|
docker:
|
||||||
archlinux: ["docker", "docker-compose"]
|
archlinux: ["docker", "docker-compose"]
|
||||||
font-awesome:
|
font-awesome:
|
||||||
archlinux: ["ttf-font-awesome"]
|
archlinux: ["ttf-font-awesome", "otf-font-awesome"]
|
||||||
font-inconsolata:
|
font-inconsolata:
|
||||||
archlinux: ["ttf-inconsolata"]
|
archlinux: ["ttf-inconsolata"]
|
||||||
font-dejavu:
|
font-dejavu:
|
||||||
@@ -62,7 +70,7 @@ packages:
|
|||||||
archlinux: ["noto-fonts-emoji"]
|
archlinux: ["noto-fonts-emoji"]
|
||||||
git:
|
git:
|
||||||
# tk required for gitk
|
# tk required for gitk
|
||||||
archlinux: ["git", "tk", "git-delta"]
|
archlinux: ["git", "tk", "git-delta", "git-filter-repo"]
|
||||||
htop:
|
htop:
|
||||||
archlinux: ["htop"]
|
archlinux: ["htop"]
|
||||||
feh:
|
feh:
|
||||||
@@ -77,6 +85,8 @@ packages:
|
|||||||
archlinux: ["pluma"]
|
archlinux: ["pluma"]
|
||||||
neovim:
|
neovim:
|
||||||
archlinux: ["neovim", "python-pynvim"]
|
archlinux: ["neovim", "python-pynvim"]
|
||||||
|
vim:
|
||||||
|
archlinux: ["vim"]
|
||||||
network-manager-applet:
|
network-manager-applet:
|
||||||
archlinux: ["network-manager-applet"]
|
archlinux: ["network-manager-applet"]
|
||||||
pasystray:
|
pasystray:
|
||||||
@@ -104,9 +114,9 @@ packages:
|
|||||||
pdf:
|
pdf:
|
||||||
archlinux: ["ghostscript", "enscript"]
|
archlinux: ["ghostscript", "enscript"]
|
||||||
pandoc:
|
pandoc:
|
||||||
archlinux: ["pandoc", "texlive-core", "texlive-fontsextra", "texlive-latexextra"]
|
archlinux: ["pandoc-cli", "texlive-basic", "texlive-fontsextra", "texlive-latexextra"]
|
||||||
libvirt:
|
libvirt:
|
||||||
archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables", "dmidecode", "virt-install", "virt-viewer", "libguestfs", "edk2-ovmf"]
|
archlinux: ["virt-manager", "libvirt", "dnsmasq", "iptables-nft", "dmidecode", "virt-install", "virt-viewer", "libguestfs", "edk2-ovmf"]
|
||||||
firefox:
|
firefox:
|
||||||
archlinux: ["firefox"]
|
archlinux: ["firefox"]
|
||||||
ranger:
|
ranger:
|
||||||
@@ -125,7 +135,7 @@ packages:
|
|||||||
archlinux: ["xcompmgr"]
|
archlinux: ["xcompmgr"]
|
||||||
python:
|
python:
|
||||||
archlinux:
|
archlinux:
|
||||||
- python3
|
- python
|
||||||
- python-lsp-server
|
- python-lsp-server
|
||||||
python-modules:
|
python-modules:
|
||||||
archlinux:
|
archlinux:
|
||||||
@@ -171,7 +181,7 @@ packages:
|
|||||||
gpg:
|
gpg:
|
||||||
archlinux: ["gnupg", "paperkey", "yubikey-manager", "yubikey-touch-detector"]
|
archlinux: ["gnupg", "paperkey", "yubikey-manager", "yubikey-touch-detector"]
|
||||||
networkmanager:
|
networkmanager:
|
||||||
archlinux: ["networkmanager"]
|
archlinux: ["networkmanager", "capnet-assist"]
|
||||||
pulseaudio:
|
pulseaudio:
|
||||||
archlinux:
|
archlinux:
|
||||||
- pulseaudio
|
- pulseaudio
|
||||||
@@ -301,7 +311,7 @@ packages:
|
|||||||
php:
|
php:
|
||||||
archlinux: ["php"]
|
archlinux: ["php"]
|
||||||
exa:
|
exa:
|
||||||
archlinux: ["exa"]
|
archlinux: ["eza"]
|
||||||
just:
|
just:
|
||||||
archlinux: ["just"]
|
archlinux: ["just"]
|
||||||
ripgrep:
|
ripgrep:
|
||||||
@@ -413,17 +423,23 @@ packages:
|
|||||||
- ruff
|
- ruff
|
||||||
mold:
|
mold:
|
||||||
archlinux:
|
archlinux:
|
||||||
|
- clang
|
||||||
- mold
|
- mold
|
||||||
arch-packaging:
|
arch-packaging:
|
||||||
archlinux:
|
archlinux:
|
||||||
- namcap
|
- namcap
|
||||||
- devtools
|
- devtools
|
||||||
dron:
|
- arch-install-scripts
|
||||||
|
- archiso
|
||||||
|
drone:
|
||||||
archlinux:
|
archlinux:
|
||||||
- drone-cli
|
- drone-cli
|
||||||
sqlite:
|
sqlite:
|
||||||
archlinux:
|
archlinux:
|
||||||
- sqlite
|
- sqlite
|
||||||
|
css:
|
||||||
|
archlinux:
|
||||||
|
- vscode-css-languageserver
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
mousepad:
|
mousepad:
|
||||||
@@ -442,3 +458,5 @@ packages:
|
|||||||
archlinux: ["openvpn"]
|
archlinux: ["openvpn"]
|
||||||
bluetooth:
|
bluetooth:
|
||||||
archlinux: ["bluez", "bluez-tools", "blueman"]
|
archlinux: ["bluez", "bluez-tools", "blueman"]
|
||||||
|
borgbackup:
|
||||||
|
archlinux: ["borg"]
|
||||||
|
|||||||
Submodule pkgbuilds/portfolio-performance-bin updated: 035cfcc72e...86b153e614
41
remove-unconfigured-packages.sh
Executable file
41
remove-unconfigured-packages.sh
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -a aurdeps=()
|
||||||
|
|
||||||
|
proctected=(
|
||||||
|
nvidia-dkms
|
||||||
|
intel-ucode
|
||||||
|
amd-ucode
|
||||||
|
base
|
||||||
|
java-runtime-common
|
||||||
|
jdk17-openjdk
|
||||||
|
)
|
||||||
|
|
||||||
|
for pkgbuild in pkgbuilds/*/PKGBUILD ; do
|
||||||
|
source "${pkgbuild}"
|
||||||
|
aurdeps+=("${depends[@]%%[<=>]*}" "${makedepends[@]%%[<=>]*}" "${pkgname}")
|
||||||
|
done
|
||||||
|
|
||||||
|
packages_to_remove=()
|
||||||
|
|
||||||
|
readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \
|
||||||
|
<(cat \
|
||||||
|
<(<packages.yml yaml2json | jq --raw-output0 '.packages.list | map(.archlinux) | flatten[]') \
|
||||||
|
<(for dep in "${aurdeps[@]}" ; do printf '%s\0' "${dep}" ; done) \
|
||||||
|
| sort -zu) \
|
||||||
|
<(pacman -Qq --explicit | xargs -I "{}" printf '%s\0' "{}" | sort -zu) \
|
||||||
|
| while IFS= read -r -d $'\0' package; do
|
||||||
|
skip=0
|
||||||
|
for protected in "${proctected[@]}" ; do
|
||||||
|
if [[ "${package}" == "${protected}" ]] ; then
|
||||||
|
skip=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if (( skip )) ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
printf '%s\0' "${package}"
|
||||||
|
done)
|
||||||
|
|
||||||
|
sudo pacman -Rcns "${packages_to_remove[@]}"
|
||||||
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
tmpdir="$(mktemp -d)"
|
|
||||||
|
|
||||||
trap "rm -rf ${tmpdir}" EXIT
|
|
||||||
|
|
||||||
git archive --format tar --output "${tmpdir}/dotfiles.tar" HEAD
|
|
||||||
|
|
||||||
git submodule foreach 'bash -x -c "
|
|
||||||
set -o errexit
|
|
||||||
git archive --prefix $path/ HEAD --output '"${tmpdir}/submod.tar"'
|
|
||||||
tar -i --concatenate --file='"${tmpdir}/dotfiles.tar"' '"${tmpdir}/submod.tar"'
|
|
||||||
rm '"${tmpdir}/submod.tar"'
|
|
||||||
"'
|
|
||||||
|
|
||||||
gzip -k -f -v "${tmpdir}/dotfiles.tar"
|
|
||||||
|
|
||||||
test_ares() {
|
|
||||||
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
|
|
||||||
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
|
|
||||||
else
|
|
||||||
echo "Warning: /var/cache/pacman/pkg/ does not exist. Create it to speed up multiple runs" >&2
|
|
||||||
fi
|
|
||||||
docker pull docker.io/library/archlinux:base
|
|
||||||
docker run \
|
|
||||||
-ti \
|
|
||||||
--rm \
|
|
||||||
-v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro \
|
|
||||||
--mount type=tmpfs,destination=/var/cache/pacman/pkg/ \
|
|
||||||
"${dockeropts[@]}" \
|
|
||||||
--hostname ares \
|
|
||||||
docker.io/library/archlinux:base \
|
|
||||||
sh -c '
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
# Uncomment CacheDir and append the host pacman cache as cachedir
|
|
||||||
# At worst, the cache directory will be ignored if it does not exist
|
|
||||||
# Pacman will always prefer the first cache directory, so newly downloaded
|
|
||||||
# packages will stay in the container
|
|
||||||
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf
|
|
||||||
|
|
||||||
mkdir -p /var/cache/pacman/pkg_host/
|
|
||||||
pacman -Syu --noconfirm linux
|
|
||||||
cd $(mktemp -d)
|
|
||||||
tar xf /tmp/dotfiles.tar.gz -C .
|
|
||||||
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
|
||||||
'
|
|
||||||
}
|
|
||||||
|
|
||||||
test_neptune() {
|
|
||||||
docker run \
|
|
||||||
-ti \
|
|
||||||
--rm \
|
|
||||||
-v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro \
|
|
||||||
--mount type=tmpfs,destination=/var/cache/pacman/pkg/ \
|
|
||||||
"${dockeropts[@]}" \
|
|
||||||
--hostname neptune \
|
|
||||||
docker.io/library/archlinux:base \
|
|
||||||
sh -c '
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
# Uncomment CacheDir and append the host pacman cache as cachedir
|
|
||||||
# At worst, the cache directory will be ignored if it does not exist
|
|
||||||
# Pacman will always prefer the first cache directory, so newly downloaded
|
|
||||||
# packages will stay in the container
|
|
||||||
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf
|
|
||||||
|
|
||||||
mkdir -p /var/cache/pacman/pkg_host/
|
|
||||||
pacman -Syu --noconfirm linux
|
|
||||||
cd $(mktemp -d)
|
|
||||||
tar xf /tmp/dotfiles.tar.gz -C .
|
|
||||||
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
|
||||||
'
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${1:-all}" in
|
|
||||||
ares)
|
|
||||||
test_ares
|
|
||||||
;;
|
|
||||||
neptune)
|
|
||||||
test_neptune
|
|
||||||
;;
|
|
||||||
all)
|
|
||||||
test_ares
|
|
||||||
test_neptune
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
4
test.sh
4
test.sh
@@ -18,7 +18,9 @@ cleanup() {
|
|||||||
rm -rf "${tmpdir}"
|
rm -rf "${tmpdir}"
|
||||||
pids=()
|
pids=()
|
||||||
jobs -p | while IFS="" read -r line; do pids+=("$line"); done
|
jobs -p | while IFS="" read -r line; do pids+=("$line"); done
|
||||||
kill "${pids[@]}"
|
if (( "${#pids[@]}" > 0)) ; then
|
||||||
|
kill "${pids[@]}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
download_iso() {
|
download_iso() {
|
||||||
|
|||||||
Reference in New Issue
Block a user