mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-21 14:22:45 +00:00
add setup script testing workflow
This commit is contained in:
parent
c83c7a5c17
commit
ab8abc1979
33
.github/workflows/setup.yml
vendored
Normal file
33
.github/workflows/setup.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
name: Test dotfiles run
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allow manual trigger
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup: # try setting up user with setup script
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install git on container and add user
|
||||||
|
run: |
|
||||||
|
pacman -Sy --noconfirm git opendoas
|
||||||
|
pacman-key --init
|
||||||
|
useradd -m glados -G wheel
|
||||||
|
echo permit nopass :wheel > /etc/doas.conf
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run setup
|
||||||
|
run: |
|
||||||
|
cp -r /__w/dotfiles/dotfiles /home/glados/.dotfiles
|
||||||
|
su glados -c /home/glados/.dotfiles/bin/setup
|
||||||
|
mkdwarfs -i /home/glados -o /home.dwarfs
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: home.dwarfs
|
||||||
|
path: /home.dwarfs
|
4
arch/devkitpro.conf
Normal file
4
arch/devkitpro.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[dkp-libs]
|
||||||
|
Server = https://pkg.devkitpro.org/packages
|
||||||
|
[dkp-linux]
|
||||||
|
Server = https://pkg.devkitpro.org/packages/linux/$arch/
|
38
arch/dwarfs-universal
Normal file
38
arch/dwarfs-universal
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Maintainer: phantop <phantop@tuta.io>
|
||||||
|
pkgname=dwarfs-universal
|
||||||
|
pkgver=0.10.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A fast high compression read-only file system (pre-compiled binaries)'
|
||||||
|
url='https://github.com/mhx/dwarfs'
|
||||||
|
source=("https://github.com/mhx/dwarfs/releases/download/v${pkgver}/dwarfs-${pkgver}-Linux-${CARCH}-clang.tar.xz"
|
||||||
|
"https://github.com/mhx/dwarfs/releases/download/v${pkgver}/dwarfs-universal-${pkgver}-Linux-${CARCH}-clang"
|
||||||
|
"https://github.com/mhx/dwarfs/raw/main/scripts/extract_blocks.py")
|
||||||
|
arch=('x86_64' 'aarch64')
|
||||||
|
license=('GPL3')
|
||||||
|
depends=( 'fuse3' )
|
||||||
|
conflicts=('dwarfs')
|
||||||
|
provides=('dwarfs')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "${srcdir}/dwarfs-universal-${pkgver}-Linux-${CARCH}-clang" "${pkgdir}/usr/bin/dwarfsuniversal"
|
||||||
|
install -Dm755 "${srcdir}/extract_blocks.py" "${pkgdir}/usr/bin/dwarfsblocks"
|
||||||
|
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfsck"
|
||||||
|
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfsextract"
|
||||||
|
ln -s dwarfsuniversal "${pkgdir}/usr/bin/mkdwarfs"
|
||||||
|
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfs"
|
||||||
|
|
||||||
|
# mount will just run dwarfsuniversal otherwise
|
||||||
|
printf '#!/bin/sh\ndwarfs "$@"' > "${pkgdir}/usr/bin/mount.dwarfs"
|
||||||
|
chmod 755 "${pkgdir}/usr/bin/mount.dwarfs"
|
||||||
|
|
||||||
|
cd "${srcdir}/dwarfs-${pkgver}-Linux-${CARCH}-clang"
|
||||||
|
install -Dm644 share/man/man1/dwarfs.1 "$pkgdir/usr/share/man/man1/dwarfs.1"
|
||||||
|
install -Dm644 share/man/man1/dwarfsck.1 "$pkgdir/usr/share/man/man1/dwarfsck.1"
|
||||||
|
install -Dm644 share/man/man1/dwarfsextract.1 "$pkgdir/usr/share/man/man1/dwarfsextract.1"
|
||||||
|
install -Dm644 share/man/man1/mkdwarfs.1 "$pkgdir/usr/share/man/man1/mkdwarfs.1"
|
||||||
|
install -Dm644 share/man/man5/dwarfs-format.5 "$pkgdir/usr/share/man/man5/dwarfs-format.5"
|
||||||
|
}
|
||||||
|
# update by removing and running `makepkg -g >> PKGBUILD`
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP')
|
|
@ -1,4 +1,6 @@
|
||||||
advancecomp
|
advancecomp
|
||||||
|
android-tools
|
||||||
|
anime4k-git
|
||||||
apparmor
|
apparmor
|
||||||
arch-install-scripts
|
arch-install-scripts
|
||||||
ares-emu-avx-git
|
ares-emu-avx-git
|
||||||
|
@ -28,7 +30,6 @@ cpupower
|
||||||
csvlens
|
csvlens
|
||||||
dart-sass
|
dart-sass
|
||||||
devkitpro-keyring
|
devkitpro-keyring
|
||||||
discord
|
|
||||||
doas-sudo-shim
|
doas-sudo-shim
|
||||||
dolphin-emu
|
dolphin-emu
|
||||||
dolphin-emu-tool
|
dolphin-emu-tool
|
||||||
|
@ -153,6 +154,7 @@ python-html2text
|
||||||
python-lxml-html-clean
|
python-lxml-html-clean
|
||||||
python-pip
|
python-pip
|
||||||
python-pipx
|
python-pipx
|
||||||
|
python-playsound
|
||||||
python-pylint
|
python-pylint
|
||||||
python-readability-lxml
|
python-readability-lxml
|
||||||
qbittorrent
|
qbittorrent
|
||||||
|
@ -181,12 +183,12 @@ squashfs-tools
|
||||||
starship
|
starship
|
||||||
steam
|
steam
|
||||||
stow
|
stow
|
||||||
subliminal-git
|
|
||||||
sxiv
|
sxiv
|
||||||
syncplay
|
syncplay
|
||||||
syncthing
|
syncthing
|
||||||
system-config-printer
|
system-config-printer
|
||||||
tig
|
tig
|
||||||
|
tk
|
||||||
tldr
|
tldr
|
||||||
tmux
|
tmux
|
||||||
torsocks
|
torsocks
|
6
arch/pacman.conf
Normal file
6
arch/pacman.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[multilib]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
[chaotic-aur]
|
||||||
|
Include = /etc/pacman.d/chaotic-mirrorlist
|
||||||
|
[options]
|
||||||
|
ParallelDownloads = 20
|
31
bin/setup
31
bin/setup
|
@ -1,30 +1,38 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
alias g=git l='ln -s' p='s pacman --noconfirm' s=sudo t='s tee -a' w=wget
|
alias g=git l='ln -s' p='s pacman --noconfirm' s=sudo t='s tee -a' w=wget
|
||||||
|
if command -v doas; then
|
||||||
|
alias s='doas'
|
||||||
|
fi
|
||||||
|
|
||||||
s pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
s pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
||||||
s pacman-key --lsign-key 3056513887B78AEB
|
s pacman-key --lsign-key 3056513887B78AEB
|
||||||
p -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
|
p -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
|
||||||
printf '[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n' | t /etc/pacman.conf
|
|
||||||
s pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
|
s pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
|
||||||
s pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0
|
s pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0
|
||||||
p -U 'https://pkg.devkitpro.org/devkitpro-keyring.pkg.tar.xz'
|
p -U 'https://pkg.devkitpro.org/devkitpro-keyring.pkg.tar.xz'
|
||||||
printf '[dkp-libs]\nServer = https://pkg.devkitpro.org/packages\n' | t /etc/pacman.conf
|
t /etc/pacman.conf < ~/.dotfiles/arch/pacman.conf
|
||||||
printf "[dkp-linux]\nServer = https://pkg.devkitpro.org/packages/linux/\$arch/\n" | t /etc/pacman.conf
|
|
||||||
|
|
||||||
echo permit :wheel | t /etc/doas.conf
|
echo permit nopass :wheel | t /etc/doas.conf
|
||||||
p -Syu
|
p -Syu
|
||||||
xargs sudo pacman --noconfirm -S --needed < ~/.dotfiles/archpkgs
|
#shellcheck disable=SC2046
|
||||||
|
p -S --needed $(grep -v devkit ~/.dotfiles/arch/packages)
|
||||||
yay -S pandoc-bin shellcheck-bin --noconfirm
|
yay -S pandoc-bin shellcheck-bin --noconfirm
|
||||||
chsh -s "$(grep -m1 bin/fish /etc/shells)"
|
cp ~/.dotfiles/arch/dwarfs-universal /tmp/PKGBUILD
|
||||||
|
makepkg -srD /tmp
|
||||||
|
p -U /tmp/*.tar.zst
|
||||||
|
t /etc/pacman.conf < ~/.dotfiles/arch/devkitpro.conf
|
||||||
|
|
||||||
echo kernel.core_pattern=/dev/null | t /etc/sysctl.d/50-coredump.conf
|
echo kernel.core_pattern=/dev/null | t /etc/sysctl.d/50-coredump.conf
|
||||||
echo options i915 enable_rc6=1 enable_fbc=1 lvds_downclock=1 enable__psr=1 | t /etc/modprobe.d/i915.conf
|
echo options i915 enable_rc6=1 enable_fbc=1 lvds_downclock=1 enable__psr=1 | t /etc/modprobe.d/i915.conf
|
||||||
echo options lsm=landlock,lockdown,yama,integrity,apparmor,bpf | t /boot/loader/entries/*.conf
|
if bootctl status | grep systemd-boot; then
|
||||||
|
echo options lsm=landlock,lockdown,yama,integrity,apparmor,bpf | t /boot/loader/entries/*.conf
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p ~/.parallel/will-cite ~/.config/aria2
|
mkdir -p ~/.parallel/will-cite ~/.config/aria2
|
||||||
stow --no-folding -d ~/.dotfiles -t ~/.config .
|
stow --no-folding -d ~/.dotfiles -t ~/.config .
|
||||||
~/.dotfiles/bin/config.fish
|
~/.dotfiles/bin/config.fish
|
||||||
|
s chsh -s "$(grep -m1 bin/fish /etc/shells)" "$USER"
|
||||||
|
|
||||||
w https://github.com/dracula/kitty/raw/master/dracula.conf -P ~/.config/kitty
|
w https://github.com/dracula/kitty/raw/master/dracula.conf -P ~/.config/kitty
|
||||||
w https://github.com/dracula/musikcube/raw/main/dracula.json -P ~/.config/musikcube/themes
|
w https://github.com/dracula/musikcube/raw/main/dracula.json -P ~/.config/musikcube/themes
|
||||||
|
@ -58,11 +66,10 @@ curl -L https://github.com/ngosang/trackerslist/raw/master/trackers_best.txt | t
|
||||||
g g p:appdwarf ~/.local/appdwarf
|
g g p:appdwarf ~/.local/appdwarf
|
||||||
g g p:haiku-icons ~/.local/share/icons/Haiku
|
g g p:haiku-icons ~/.local/share/icons/Haiku
|
||||||
|
|
||||||
for i in ~/.dotfiles/dconf/*; do
|
if test "$DBUS_SESSION_BUS_ADDRESS"; then
|
||||||
|
for i in ~/.dotfiles/dconf/*; do
|
||||||
dconf reset -f "$(basename "$i" | tr : /)"
|
dconf reset -f "$(basename "$i" | tr : /)"
|
||||||
#shellcheck disable=SC2094
|
#shellcheck disable=SC2094
|
||||||
dconf load "$(basename "$i" | tr : /)" < "$i"
|
dconf load "$(basename "$i" | tr : /)" < "$i"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
s usermod -aG docker "$USER"
|
|
||||||
s usermod -aG input "$USER"
|
|
||||||
|
|
Loading…
Reference in a new issue