Refactor the software install workflow

This commit is contained in:
Manuel Thalmann 2024-09-13 14:47:07 +02:00
parent 0ebca3e82a
commit a7be9fa736
25 changed files with 41 additions and 57 deletions

View file

@ -5,6 +5,9 @@ begin
function installSW -V dir
yayinst firefox
end
function configureSW -V dir
fish "$dir/../../../Common/Software/Firefox/main.fish" configure
end

View file

@ -9,8 +9,6 @@ begin
yayinst \
icedtea-web
configureSW
end
function configureSW

View file

@ -19,8 +19,6 @@ begin
# File Exchange Support for KDE Connect: https://wiki.archlinux.org/title/KDE#KDE_Connect
) sshfs \
fwupd
configureSW
end
function configureSW

View file

@ -6,8 +6,6 @@ begin
function installSW
yayinst \
pennywise-bin
configureSW
end
function configureSW

View file

@ -14,8 +14,6 @@ begin
swtpm \
lxc \
virt-bootstrap-git
configureSW
end
function configureSW -V dir

View file

@ -3,10 +3,12 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst \
aliae-bin
end
function configureSW -V dir
fish "$dir/../../../Common/Software/aliae/main.fish" configure
end

View file

@ -3,12 +3,14 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst brave-bin (
# brave-beta-bin
# brave-nightly-bin
)
end
function configureSW -V dir
fish "$dir/../../../Common/Software/brave/main.fish" configure
end

View file

@ -3,7 +3,7 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst \
git \
git-lfs \
@ -11,8 +11,10 @@ begin
gitflow-bashcompletion-avh \
gitflow-fishcompletion-avh \
gitflow-zshcompletion-avh
end
and fish "$dir/../../../Common/Software/git/main.fish" configure
function configureSW -V dir
fish "$dir/../../../Common/Software/git/main.fish" configure
end
runInstaller $argv

View file

@ -32,8 +32,6 @@ begin
rm -rf "$contextRoot"
end
configureSW
end
function configureSW -V dir

View file

@ -3,8 +3,11 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst grub-theme-minegrub-git
end
function configureSW -V dir
fish "$dir/../../../Common/Software/minegrub-theme/main.fish" configure
end

View file

@ -3,8 +3,11 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst nodejs-n
end
function configureSW -V dir
sudo --preserve-env --set-home fish "$dir/../../../Common/Software/n/main.fish" configure
end

View file

@ -7,8 +7,6 @@ begin
yayinst \
openssh \
libfido2
source (status filename) configure
end
function configureSW

View file

@ -3,8 +3,11 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst pyenv
end
function configureSW -V dir
fish "$dir/../../../Common/Software/pyenv/main.fish" configure
end

View file

@ -4,10 +4,12 @@ begin
source "$dir/../../Scripts/software.fish"
source "$dir/../../../Common/Software/rclone/main.fish"
function installSW -V dir
function installSW
yayinst \
rclone
end
function configureSW -V dir
fish "$dir/../../../Common/Software/rclone/main.fish" configure
end

View file

@ -8,7 +8,6 @@ begin
# yes | yayinst sddm-git
# stable version
yayinst sddm
configureSW
end
function configureSW -V dir

View file

@ -4,7 +4,7 @@ begin
source "$dir/../../Scripts/software.fish"
source "$dir/../../../Common/Software/vim/main.fish"
function installSW -V dir
function installSW
yayinst (
# Necessary for accessing clipboard in terminal: https://wiki.archlinux.org/title/Vim
) gvim \
@ -12,8 +12,11 @@ begin
# Add clipboard support for wayland: https://www.reddit.com/r/Fedora/comments/ax9p9t/comment/jjb4p7b/
) vim-wayland-clipboard-git \
wl-clipboard
end
and fish "$dir/../../../Common/Software/vim/main.fish" configure
function configureSW -V dir
fish "$dir/../../../Common/Software/vim/main.fish" configure
end
runInstaller $argv

View file

@ -9,8 +9,6 @@ begin
visual-studio-code-bin (
# Trash functionality
) gvfs
configureSW
end
function configureSW -V dir

View file

@ -3,10 +3,12 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW -V dir
function installSW
yayinst \
zoxide
end
function configureSW -V dir
fish "$dir/../../../Common/Software/zoxide/main.fish" configure
end

View file

@ -12,23 +12,17 @@ begin
end
function runInstaller -V dir -a action
source "$dir/config.fish"
if [ -z "$action" ] || [ "$action" = "install" ]
installSW $argv[2..]
else if [ "$action" = "configure" ]
configureSW $argv[2..]
source "$dir/config.fish"
set -l users (getUsers)
runInstaller "configure"
if not isConfigured || [ "$USER" != (getConfig "valhalla.setupUser.name") ]
runInstaller userConfig
end
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
if [ "$name" != "$USER" ]
runInstaller userConfig "$name"
end
end
else if [ "$action" = "configure" ]
configureSW $argv[2..]
else if [ "$action" = "userConfig" ]
set -l name $argv[2]

View file

@ -3,9 +3,6 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
end
function configureSW
sudo virsh net-autostart default

View file

@ -3,10 +3,6 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
configureSW
end
function configureSW -V dir
source "$dir/../bash/profile.fish"
source "$dir/../fish/profile.fish"

View file

@ -3,10 +3,6 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
configureSW
end
function configureSW -V dir
begin
printf %s\n \

View file

@ -5,7 +5,6 @@ begin
function installSW
npm install --global n
configureSW
end
function configureSW

View file

@ -3,10 +3,6 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
configureSW
end
function configureSW
set -l configFile /etc/vimrc
set -l indicator "set clipboard"

View file

@ -3,10 +3,6 @@ begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
configureSW
end
function configureSW -V dir
source "$dir/../bash/profile.fish"
source "$dir/../fish/profile.fish"