Refactor the sudo
configuration script
This commit is contained in:
parent
1095853916
commit
fb2ff92b73
|
@ -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
|
||||
|
@ -82,7 +82,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)
|
||||
|
|
|
@ -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
|
||||
|
|
15
scripts/Arch/Software/sudo/main.fish
Executable file
15
scripts/Arch/Software/sudo/main.fish
Executable 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
|
|
@ -14,7 +14,7 @@ if [ (id -u) -eq 0 ]
|
|||
--comment "PortValhalla setup user" \
|
||||
--system \
|
||||
--no-user-group \
|
||||
--groups wheel,nix-users \
|
||||
--groups nix-users \
|
||||
--create-home \
|
||||
--uid (getConfig valhalla.setupUser.id --json) \
|
||||
"$name"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue