various improvements and fixes
[distro-setup] / distro-begin
index 5ae900f8b122d296cc511598e25b9bcddb857f8f..a408d27bec7b3919e5a24e05e69502de9c4c4eb9 100755 (executable)
@@ -65,7 +65,7 @@ if [[ $1 ]]; then
     export HOSTNAME=$1
 fi
 
-for f in iank-dev htpc treetowl x2 frodo tp li lj demohost kw; do
+for f in iank-dev htpc treetowl x2 frodo tp li lj demohost kw fz; do
     eval "$f() { [[ $HOSTNAME == $f ]]; }"
 done
 has_p() { ! linode; } # when tp is tracis, then not tp either
@@ -239,6 +239,8 @@ if isdeb; then
 
 fi
 
+
+###### begin arch aur wrapper ########
 if isarch; then
     #https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
     sudo pacman -S --noconfirm --needed base-devel jq
@@ -264,18 +266,44 @@ if isarch; then
     sudo systemctl enable pacserve.service
     sudo systemctl start pacserve.service
 
+fi
+###### end arch aur wrapper ########
+
+pup
+
+
+###### begin trash cli install ######
+if isarch; then
     # strange error if just installing trash-cli: "pyalpm requires python",
     # so I see that it requires python2, and installing that manually fixes it.
-    # I didn't see this on earlier installation, main thing which changed was
-    # pacserve, so not sure if it's related.
+    # I didn\'t see this on earlier installation, main thing which changed was
+    # pacserve, so not sure if it\'s related.
     pi python2
 fi
-
-pup
 pi trash-cli
+###### end trash cli install ######
 
 
-###### link files ###########
+######## begin fix evbug bug ######
+case $distro in
+    trisquel|ubuntu)
+        # noticed in flidas.
+        #https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/240553
+        sudo rmmod evbug ||: # might not be loaded yet
+        file=/etc/modprobe.d/blacklist.conf
+        line="blacklist evbug"
+        if ! grep -xFq "$line" $file; then
+            sudo tee -a $file &>/dev/null <<<"$line"
+            sudo depmod -a
+            sudo update-initramfs -u
+        fi
+        ;;
+esac
+######## end fix evbug bug ######
+
+
+
+###### begin link files ###########
 # convenient to just do all file linking in one place
 
 
@@ -303,6 +331,8 @@ if has_p; then
     lnf -T /i/k/mboxes ~/mail
 fi
 
+###### end link files ###########
+
 
 ##### basic needed packages
 
@@ -316,7 +346,10 @@ case $(distro-name) in
             else
                 pi xmacro
             fi
-            pi gtk-redshift xinput
+            pi xinput
+            # recommends gets us geoclue (for darkening automatically at night i assume),
+            # which recommends modemmanager, which is annoying to fix for the model01 keyboard.
+            pi --no-install-recommends gtk-redshift
         fi
         ;;&
     fedora)
@@ -511,7 +544,7 @@ if encrypted; then
     sudo systemctl enable fstrim.timer
 fi
 
-dirs=(/mnt/{1,2,3,4,5,6,7,8,9})
+dirs=(/mnt/{1,2,3,4,5,6,7,8,9} /nocow/t)
 s mkdir -p "${dirs[@]}"
 s chown $USER:$USER  "${dirs[@]}"