This commit is contained in:
Toerd@480 2019-06-10 20:29:42 +02:00
parent 869094dc1c
commit 70124c4b61
2 changed files with 14 additions and 9 deletions

View File

@ -133,10 +133,16 @@ installation_loop() {
enable_service() {
for service in "$@"; do
dialog --infobox "Enabling: $service" 0 0
systemctl enable "$service"
systemctl start "$service"
echo "Services $service started\n\n" >> $logfile
dialog --infobox "Enabling: $service" 0 0
if [[ $@ =~ "--user.*" ]]
then
sudo -u $uname systemctl enable "$service"
sudo -u $uname systemctl start "$service"
else
systemctl enable "$service"
systemctl start "$service"
fi
echo "Services $service started\n\n" >> $logfile
done
}
@ -206,8 +212,8 @@ set_pacman_config() {
}
set_git_config() {
sudo -u $uname git config --global user.email=philip.gaber@gmail.com
sudo -u $uname git config --global user.name=Toerd@$(hostname)
sudo -u $uname git config --global user.email "philipg@posteo.de"
sudo -u $uname git config --global user.name "Toerd@"$(hostname)
sudo -u $uname git config --global credential.useHttpPath true
sudo -u $uname git config --global credential.helper /usr/bin/pass-git-helper
}
@ -236,11 +242,10 @@ case $todo in
get_credentials
pre_install
create_user
set_permissions "%wheel ALL=(ALL) NOPASSWD: ALL"
install_aur_helper
installation_loop
download_dotfiles
set_permissions "%wheel ALL=(ALL) ALL\\n%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys"
set_permissions "Defaults timestamp_timeout=45\n%wheel ALL=(ALL) ALL\n%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys"
no_beep
set_system_stuff
enable_service "--user syncthing" "netctl-auto@wlp3s0" "--user offlineimap@philip_thi" "--user offlineimap@philip_posteo" "--user offlineimap@philip_gmail"

View File

@ -72,7 +72,7 @@ A,P,pandoc,A universal document converter
A,P,auctex,latexpreview
# Mail
A,P,mu,Maildir indexer/searcher and Emacs client (mu4e)
A,A,mu,Maildir indexer/searcher and Emacs client (mu4e)
A,P,offlineimap,Synchronizes emails between two repositories
# Webbrowsing

1 # First column: A = All, L = Laptop, D = Desktop
72 A,A,pass-git-helper,git password helper
73 A,P,python-tldextract,lib for qute-pass
74 A,P,zip,Compressor/archiver for creating and modifying zipfiles
75 A,P,p7zip,Command-line file archiver with high compression ratio
76 A,P,ripgrep,A search tool that combines the usability of ag with the raw speed of grep
77 A,P,fzf,fuzzy bash completion
78 A,P,aspell,no desc