-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Chancellor <[email protected]>
- Loading branch information
1 parent
6e26b34
commit 8e6d0b9
Showing
6 changed files
with
259 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
[Build] | ||
WithNetwork=true | ||
|
||
[Content] | ||
Bootable=false | ||
Packages= | ||
# base/misc packages | ||
base-devel | ||
systemd-sysvcompat | ||
tzdata | ||
|
||
# Nicer versions of certain GNU utilities | ||
bat | ||
bat-extras | ||
diskus | ||
eza | ||
fd | ||
ripgrep | ||
|
||
# b4 | ||
b4 | ||
git-filter-repo | ||
patatt | ||
python-dkim | ||
|
||
# compression/decompression/extraction | ||
bzip2 | ||
gzip | ||
lzop | ||
lz4 | ||
pbzip2 | ||
pigz | ||
unzip | ||
zip | ||
zstd | ||
|
||
# development | ||
ccache | ||
diffutils | ||
hyperfine | ||
lib32-glibc | ||
python | ||
python-setuptools | ||
python-yaml | ||
ruff | ||
shfmt | ||
yapf | ||
|
||
lei | ||
mutt | ||
|
||
# env | ||
curl | ||
fastfetch | ||
fish | ||
fzf | ||
jq | ||
less | ||
moreutils | ||
openssh | ||
stow | ||
tmuxp | ||
vim | ||
vim-spell-en | ||
wget | ||
zoxide | ||
|
||
# frame-larger-than.py | ||
python-pyelftools | ||
|
||
# git | ||
git | ||
git-delta | ||
github-cli | ||
perl-authen-sasl | ||
perl-mime-tools | ||
perl-net-smtp-ssl | ||
repo | ||
|
||
# kernel / tuxmake | ||
aarch64-linux-gnu-binutils | ||
bc | ||
bison | ||
cpio | ||
flex | ||
libelf | ||
inetutils | ||
mkinitcpio | ||
ncurses | ||
openssl | ||
pahole | ||
riscv64-linux-gnu-binutils | ||
rsync | ||
socat | ||
sparse | ||
time | ||
uboot-tools | ||
|
||
# kup | ||
perl-config-simple | ||
|
||
# LLVM/clang + build-llvm.py | ||
clang | ||
cmake | ||
lld | ||
llvm | ||
ninja | ||
perf | ||
|
||
# man pages | ||
man-db | ||
|
||
# package building | ||
devtools | ||
dpkg | ||
pacman-contrib | ||
rpm-tools | ||
|
||
# spdxcheck.py | ||
python-gitpython | ||
python-ply | ||
|
||
# system administration | ||
ipmitool | ||
reflector | ||
|
||
# QEMU | ||
edk2-aarch64 | ||
edk2-ovmf | ||
libevent | ||
libutempter | ||
lsof | ||
qemu-emulators-full | ||
qemu-guest-agent | ||
qemu-img | ||
virtiofsd | ||
|
||
# website management | ||
hugo | ||
iproute2 | ||
|
||
[Distribution] | ||
Distribution=arch | ||
|
||
[Output] | ||
Format=directory | ||
ImageId=dev-arch | ||
OutputDirectory=/var/lib/machines |
Empty file.
9 changes: 9 additions & 0 deletions
9
mkosi/dev-arch/mkosi.postinst.d/00-add-grep-wrappers.fish.chroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env fish | ||
|
||
for char in e f | ||
echo '#!/bin/sh | ||
exec grep -'(string upper $char)' "$@"' >/usr/local/bin/"$char"grep | ||
end | ||
|
||
chmod 755 /usr/local/bin/*grep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env fish | ||
|
||
for conf in makepkg pacman | ||
set old /etc/$conf.conf | ||
set pacnew /etc/$conf.conf.pacnew | ||
set new /etc/$conf.conf.new | ||
|
||
if test -f $pacnew | ||
mv -v $pacnew $new | ||
else | ||
cp -v $old $new | ||
end | ||
|
||
switch $conf | ||
case makepkg | ||
sed -i 's/^#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc)"/g' $new | ||
sed -i 's/^!ccache/ccache/g' $new | ||
|
||
case pacman | ||
sed -i 's/^CheckSpace/#CheckSpace/g' $new | ||
sed -i 's/^#VerbosePkgLists/VerbosePkgLists/g' $new | ||
sed -i 's/^#Color/Color/g' $new | ||
sed -i 's/^NoProgressBar/#NoProgressBar/g' $new | ||
sed -i 's/^#ParallelDownloads = 5/ParallelDownloads = 7/g' $new | ||
sed -i "/\[core-testing\]/,/Include/"'s/^#//' $new | ||
sed -i "/\[extra-testing\]/,/Include/"'s/^#//' $new | ||
|
||
echo ' | ||
[nathan] | ||
SigLevel = Optional TrustAll | ||
Server = https://raw.githubusercontent.com/nathanchance/arch-repo/main/$arch' >>$new | ||
end | ||
|
||
if command -q git | ||
git diff --no-index $old $new | ||
else | ||
diff -Naur $old $new | ||
end | ||
|
||
mv -v $new $old | ||
end | ||
|
||
echo 'permit nopass nathan as root' >/etc/doas.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env fish | ||
|
||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen | ||
locale-gen |
54 changes: 54 additions & 0 deletions
54
mkosi/dev-arch/mkosi.postinst.d/01-install-packages.fish.chroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env fish | ||
|
||
function downgrade_pkg | ||
set pkg $argv[1] | ||
set ver $argv[2] | ||
|
||
set tarball /tmp/$pkg-$ver-x86_64.pkg.tar.zst | ||
set url https://archive.archlinux.org/packages/(string split -f 1 '' $pkg)/$pkg/(basename $tarball) | ||
|
||
curl -LSso $tarball $url | ||
and pacman -U --noconfirm $tarball | ||
and rm -fr $tarball | ||
end | ||
|
||
|
||
reflector \ | ||
--country "United States" \ | ||
--latest 15 \ | ||
--protocol https \ | ||
--save /etc/pacman.d/mirrorlist \ | ||
--sort rate | ||
|
||
and cat /etc/pacman.d/mirrorlist | ||
|
||
and pacman-key --init | ||
and pacman-key --populate | ||
|
||
# This should not be necessary but testing is broken right now | ||
# Uninstall it before updating then install it after | ||
and pacman -R --noconfirm qemu-emulators-full (pactree -u qemu-emulators-full | string match -gr '(qemu-(?:system|user)-?.*)=') | ||
|
||
# Temporarily disable the pacman sandbox | ||
and sed -i 's/^DownloadUser/#DownloadUser/g' /etc/pacman.conf | ||
|
||
and pacman -Syyuu --noconfirm | ||
|
||
and pacman -S --noconfirm qemu-emulators-full | ||
|
||
# Switch to doas from sudo non-interatively | ||
and pacman -S --ask 4 --noconfirm opendoas-sudo | ||
|
||
and pacman -S --noconfirm \ | ||
arm-linux-gnueabi-binutils \ | ||
cvise \ | ||
debhelper \ | ||
mips-linux-gnu-binutils \ | ||
powerpc64-linux-gnu-binutils \ | ||
s390x-linux-gnu-binutils \ | ||
shellcheck-bin \ | ||
tio \ | ||
tuxmake | ||
|
||
# Turn the pacman sandbox back on | ||
and sed -i 's/^#DownloadUser/DownloadUser/g' /etc/pacman.conf |