Skip to content

Commit

Permalink
allow comments, use heredoc for repos
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Detjens <[email protected]>
  • Loading branch information
detjensrobert committed Jul 11, 2024
1 parent 99c867a commit 14b4ee8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
32 changes: 16 additions & 16 deletions arch/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ RUN pacman-key --init && \

# twiddle some pacman settings
RUN sed -i -E /etc/pacman.conf \
-e 's/^#Color/Color/' \
-e 's/^NoProgressBar/#NoProgressBar/' \
-e '\|^NoExtract.+usr/share/man|d' && \
-e 's/^#Color/Color/' \
-e 's/^NoProgressBar/#NoProgressBar/' \
-e '\|^NoExtract.+usr/share/man|d' && \
sed -i -E /etc/makepkg.conf \
-e 's/^#MAKEFLAGS=.+/MAKEFLAGS="-j$(nproc)"/' \
-e '/OPTIONS/s/ debug/ !debug/'
-e 's/^#MAKEFLAGS=.+/MAKEFLAGS="-j$(nproc)"/' \
-e '/OPTIONS/s/ debug/ !debug/'

# set pacman mirrors
#COPY <<EOF /etc/pacman.d/mirrorlist
#Server = https://ziply.mm.fcix.net/archlinux/$repo/os/$arch
#Server = https://mirrors.xtom.com/archlinux/$repo/os/$arch
#Server = https://mirror.fcix.net/archlinux/$repo/os/$arch
#Server = https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
#Server = https://ftp-osl.osuosl.org/pub/archlinux/$repo/os/$arch
#EOF
RUN echo -e 'Server = https://ziply.mm.fcix.net/archlinux/$repo/os/$arch\nServer = https://mirror.fcix.net/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
COPY <<-EOF /etc/pacman.d/mirrorlist
Server = https://ziply.mm.fcix.net/archlinux/$repo/os/$arch
Server = https://mirrors.xtom.com/archlinux/$repo/os/$arch
Server = https://mirror.fcix.net/archlinux/$repo/os/$arch
Server = https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
Server = https://ftp-osl.osuosl.org/pub/archlinux/$repo/os/$arch
EOF
# RUN echo -e 'Server = https://ziply.mm.fcix.net/archlinux/$repo/os/$arch\nServer = https://mirror.fcix.net/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist

# reinstall packages with manpages
RUN pacman -Fy --noconfirm && pacman -Sy --noconfirm && \
Expand All @@ -35,15 +35,15 @@ RUN pacman -Fy --noconfirm && pacman -Sy --noconfirm && \

# and install other extra packages
COPY ./packages /
RUN pacman -Syu --needed --noconfirm $(cat /packages | xargs) && \
RUN pacman -Syu --needed --noconfirm $(cat /packages | grep -v '#' | xargs) && \
pacman -Scc --noconfirm --clean && rm /packages

# run yay as temp user
# yay tries to read /dev/tty as stdin, there is no tty here! ugh
COPY ./aur-packages /
RUN useradd yaybuilder --groups wheel --create-home && \
sudo -u yaybuilder \
yay -Sy --noconfirm --cleanafter --mflags="--nocheck" $(cat /aur-packages | xargs) && \
\ yay -Sy --noconfirm --cleanafter --mflags="--nocheck" $(cat /aur-packages | grep -v '#' | xargs) && \
userdel yaybuilder && \
rm -rf /home/yaybuilder && \
pacman -Scc --noconfirm --clean && rm /aur-packages
Expand All @@ -53,7 +53,7 @@ RUN sed -i -E 's|exec .+podman|exec podman|' $(find /usr -name docker)

# pre set distrobox host links
RUN for f in systemctl journalctl xdg-open firefox podman flatpak op ; do \
ln -s /usr/bin/distrobox-host-exec /usr/local/bin/$f; \
\ ln -s /usr/bin/distrobox-host-exec /usr/local/bin/$f; \
done

LABEL io.containers.autoupdate=registry \
Expand Down
7 changes: 7 additions & 0 deletions arch/packages
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# core items
zsh
fzf
zoxide
Expand All @@ -14,6 +15,7 @@ entr
man-pages
man-db

# other tools
act
bind
btop
Expand Down Expand Up @@ -48,20 +50,25 @@ wl-clipboard
yq
yt-dlp

# language stuff
rust cargo
ruby ruby-bundler ruby-irb ruby-pry rubygems
python ipython python-pipenv python-pipx

# cloud clis
google-cloud-cli
doctl
github-cli
glab
# aws-cli # only v1 in repo, need v2 from aur

# kubernetes
kubectl
helm
stern
kubectx
k9s

# yubikey tools
yubikey-manager
yubikey-personalization
9 changes: 2 additions & 7 deletions zed/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@ FROM ghcr.io/detjensrobert/toolbx-images:arch
# install editor packages, etc over base image

COPY ./packages /
RUN pacman -Syu --needed --noconfirm $(cat /packages | xargs) && \
RUN pacman -Syu --needed --noconfirm $(cat /packages | grep -v '#' | xargs) && \
pacman -Scc --noconfirm --clean && rm /packages

# # install packages from url (before aur for deps)
# COPY /url-packages /
# RUN pacman -U - < /url-packages && \
# pacman -Scc --noconfirm --clean && rm /url-packages

COPY ./aur-packages /
RUN useradd yaybuilder --groups wheel --create-home && \
sudo -u yaybuilder yay -Sy --noconfirm $(cat /aur-packages | xargs) && \
sudo -u yaybuilder yay -Sy --noconfirm $(cat /aur-packages | grep -v '#' | xargs) && \
userdel yaybuilder && \
rm -rf /home/yaybuilder && \
pacman -Scc --noconfirm --clean && rm /aur-packages
1 change: 1 addition & 0 deletions zed/packages
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
zed

# language servers etc
rust rust-analyzer
clang
go gopls

0 comments on commit 14b4ee8

Please sign in to comment.