Refactor the sudo configuration script

This commit is contained in:
Manuel Thalmann 2024-09-19 21:23:16 +02:00
parent 9854d1cb00
commit 64850b194e
4 changed files with 18 additions and 3 deletions

View file

@ -11,7 +11,7 @@ begin
end
function installValhallaDeps -V mountDir
pacstrap -K "$mountDir" fish git jq nix tmux
pacstrap -K "$mountDir" fish git jq nix sudo tmux
end
function getInstallerScript -V dir -S
@ -90,7 +90,6 @@ begin
and arch-chroot "$mountDir" mkinitcpio -P
and runHook installDrivers "Installing drivers..." || true
and arch-chroot "$mountDir" bash "$tempDir/../Software/sudo/install.sh"
and runInOS fish "$tempDir/../Software/GRUB/main.fish"
and if set -l keyLayout (getConfig valhalla.keyboardLayout)

View file

@ -36,6 +36,7 @@ function deploySoftware -d "Deploys a the specified software action" -a action
end
and source "$dir/../../Common/Software/bash/main.fish" $argv
and source "$dir/../Software/sudo/main.fish" $argv
and source "$dir/../Software/openssh/main.fish" $argv
and source "$dir/../Software/vim/main.fish" $argv
and source "$dir/../Software/git/main.fish" $argv

View file

@ -0,0 +1,15 @@
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function installSW
pacinst sudo
end
function configureSW
echo "%wheel ALL=(ALL:ALL) ALL" | sudo tee /etc/sudoers.d/wheel > /dev/null
end
runInstaller $argv
end

View file

@ -18,7 +18,7 @@ function runSetup
if not type -q installValhallaDeps
function installValhallaDeps
echo 'Please set up the hook `installValhallaDeps` for installing `fish`, `git`, `jq`, `nix` and `tmux`.'
echo 'Please set up the hook `installValhallaDeps` for installing `fish`, `git`, `jq`, `nix`, `sudo` and `tmux`.'
exit 1
end
end