2 # Setup Ian's computers
3 # Copyright (C) 2024 Ian Kelling
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # SPDX-License-Identifier: GPL-3.0-or-later
20 #### for setting up a new machine
21 # usage: $0 [-r] [HOSTNAME]
22 # HOSTNAME changes the machine's hostname
24 # Update target_down alerts in
25 # /a/bin/ds/filesystem/etc/prometheus/rules/iank.yml
27 # Update hostnames in /b/ds/check-remote-mailqs
28 # Update hostnames in /b/ds/machine_specific/*.hosts /p/c/machine_specific/*.hosts
29 # Update hostnames in this file
31 ### end new machine setup
34 # run any sudo command first so your pass is cached
35 # set the scrollback to unlimited in case something goes wrong
38 # send to registrar, glue records:
41 # ns1.iankelling.org 72.14.176.105
42 # ns1.iankelling.org 2600:3c00::f03c:91ff:fe6d:baf8
43 # ns2.iankelling.org 172.105.84.95
44 # ns2.iankelling.org 2a01:7e01::f03c:91ff:feb5:baec
48 # ns1.zroe.org 72.14.176.105
49 # ns1.zroe.org 2600:3c00::f03c:91ff:fe6d:baf8
50 # ns2.zroe.org 172.105.84.95
51 # ns2.zroe.org 2a01:7e01::f03c:91ff:feb5:baec
56 ####### begin setup environment #######
59 ### make ssh interactive shell run better. for when running line interactively line by line
60 sudo bash
-c '/a/exe/ssh-emacs-setup' ||
exit $?
62 ##### setup error handling
63 interactive
=true
# set this to false to force set -x
64 [[ $
- == *i
* ]] || interactive
=false
65 if ! $interactive; then
68 source /a
/bin
/bash-bear-trap
/bash-bear
72 echo 1 >~
/.local
/distro-begin
75 source /a
/bin
/distro-functions
/src
/package-manager-abstractions
78 echo "$0: $(date): starting now)"
82 if [[ $EUID == 0 ]]; then
83 if getent passwd iank || getent passwd ian
; then
84 echo "$0: error: running as root. unprivileged user exists. use it."
87 echo "$0: warning: running as root. I will setup users then exit"
95 if [[ -e /a
/opt
/emacs
]]; then
98 while [[ $1 == -* ]]; do
100 -r) recompile
=true
; shift ;;
101 -e) emacs
=false
; shift ;;
109 ##### variables/env setup
110 script_dir
="$(readlink -f "${BASH_SOURCE[@]}")"; script_dir
=${script_dir%/*}
111 # shellcheck source=./pkgs
112 source $script_dir/pkgs
114 source /a
/bin
/distro-functions
/src
/identify-distros
115 $interactive ||
set -x
116 for f
in kd x2 x3 x8 frodo tp li bk je demohost kw sy bo so
; do
117 eval "$f() { [[ $HOSTNAME == $f ]]; }"
119 codename
=$
(debian-codename
)
120 bitfolk
() { je || bk
; }
121 has_wayland
() { has_monitor
&& [[ $codename == buster
]]; }
122 has_x
() { has_monitor
&& [[ $codename != buster
]]; }
123 has_monitor
() { ! vps
; }
124 vps
() { bitfolk || li
; }
125 # linode actually has btrfs now, but we dont do anything with it.
126 has_btrfs
() { ! vps
; }
127 home_network
() { ! vps
&& ! tp
; }
128 has_p
() { ! vps
&& ! tp
; }
129 encrypted
() { ! bitfolk
; }
131 export GLOBIGNORE
="*/.:*/.."
134 sed="sed --follow-symlinks"
136 ####### end setup environment #######
139 ##### begin setup encryption scripts ######
141 # I tried making a service which was dependent on reboot.target,
142 # but it happened too late in the shutdown process.
143 sudo
dd of
=/etc
/systemd
/system
/keyscripton.service
<<'EOF'
145 Description=keyscripton
146 # This is triggered by reboot and when keyscriptoff stops.
148 # tried using graphical.target, but it made my display manager restart before rebooting.
149 # generally, I don't think targets order shutdown like they do startup.
150 # So, I did systemd-analyze plot > something.svg, and picked a reliably started
151 # service that happens late in the game.
153 DefaultDependencies=no
154 # not sure if needed, makes sure we shut down before reboot.target
155 Conflicts=reboot.target
161 ExecStop=/a/exe/keyscript-on
164 WantedBy=keyscriptoff.service
166 sudo systemctl daemon-reload
# needed if the file was already there
167 sudo systemctl
enable keyscripton.service
169 sudo
dd of
=/etc
/systemd
/system
/keyscriptoff.service
<<'EOF'
171 Description=keyscriptoff
175 ExecStart=/a/exe/keyscript-off
178 WantedBy=multi-user.target
180 sudo systemctl daemon-reload
# needed if the file was already there
181 sudo systemctl
enable keyscriptoff.service
182 sudo systemctl start keyscriptoff.service
186 ## /usr/share/doc/dropbear-initramfs/README.initramfs.gz
187 ## claims we need to do this. but it works fine without it.
189 # while read -r m _; do /sbin/modinfo -F filename "$m"; done </proc/modules | \
190 # sed -nr "s@^/lib/modules/$(uname -r)/kernel/drivers/net(/.*)?/([^/]+)\.ko\$@\2@p" \
192 # if ! diff -q /etc/initramfs-tools/modules $tmp &>/dev/null; then
193 # sudo dd if=$tmp of=/etc/initramfs-tools/modules
194 # sudo /usr/sbin/update-initramfs -u -k all
197 ## if we were creating an intall for a different machine needing different modules, we could include them all like this:
198 ## find /lib/modules/*/kernel/drivers/net /lib/modules/*/kernel/net -type f -name '*.ko' -printf "%f\n" | sed 's/.ko$//' | sort -u >/etc/initramfs-tools/modules
200 # this is here to cleanup the leftover from the comments above. remove it eventually.
201 if [[ -s /etc
/initramfs-tools
/modules
]]; then
202 sudo truncate
-s0 /etc
/initramfs-tools
/modules
203 sudo
/usr
/sbin
/update-initramfs
-u -k all
206 # initram auth keys get setup with rootsshsync later on.
207 $script_dir/rootsshsync
209 ### To do a remote unlock: ssh and do this once per crypt disk:
210 # echo -n PASS >/lib/cryptsetup/passfifo
215 ##### end setup encryption scripts ######
218 # disabled until its fixed up
221 # todo, it would be nice to cut down on some of the output
224 #### rerun my fai-time scripts
225 # already ran for pxe installs, but used for vps & updates
226 distro
=$
(distro-name
)
228 ubuntu|debian|trisquel
)
229 sudo bash
-c ". /a/bin/fai/fai-wrapper && /a/bin/fai/fai/config/scripts/IANK/11-iank"
232 sudo bash
-c ". /a/bin/fai/fai-wrapper &&
233 /a/bin/fai/fai/config/distro-install-common/end"
237 ###### setup hostname
238 if [[ $HOSTNAME != $
(cat /etc
/hostname
) ]]; then
239 echo $HOSTNAME > /etc
/hostname
240 hostname
-F /etc
/hostname
242 # office vpn dhcp adds to /etc/resolv.conf search office.fsf.org which
243 # makes that be #1 priority, which makes dnsmasq resolve that for
244 # unqualified hosts first, which means we skip the hosts file. Ya, its
245 # kinda dumb, but it is what it is. There is a dnsmasq config option to
246 # override it too, but this seems simpler.
247 sudo
sed -i --follow-symlinks -f - /etc
/hosts
<<EOF
248 \$a 127.0.1.1 $HOSTNAME.b8.nz $HOSTNAME.office.fsf.org $HOSTNAME
252 ##### exit first stage if running as root
253 if [[ $EUID == 0 ]]; then
254 if [[ ! -e /home
/iank
/.ssh
/authorized_keys
&& ! -L /home
/iank
/.ssh
/authorized_keys
]]; then
255 sudo
-u iank mkdir
-p /home
/iank
/.
ssh
256 chmod 0700 /home
/iank
/.
ssh
257 sudo
-u iank
ln -sf /p
/c
/machine_specific
/vps
/subdir_files
/.ssh
/authorized_keys
/home
/iank
/.
ssh
259 echo "$0: running as root. exiting now that users are setup"
264 #### setup bash for root
265 for x
in /a
/c
/{.bashrc
,brc
,brc2
,.bash_profile
,.profile
,.inputrc
,path_add_function
}; do
273 # convenient to just do all file linking in one place
274 sudo
/a
/exe
/lnf
-T /a
/bin
/b
275 sudo
/a
/exe
/lnf
-T /a
/f
/f
276 sudo
/a
/exe
/lnf
-T /var
/log
/exim4
/el
277 sudo
/a
/exe
/lnf
-T /a
/f
/ans
/c
278 sudo
/a
/exe
/lnf
-T /nocow
/t
/t
280 lnf
-T /p
/News ~
/News
282 dirs=(/q
/root
/q
/root
/.editor-backups
/q
/root
/.undo-tree-history
)
283 sudo mkdir
-p ${dirs[@]}
284 sudo
chmod 600 ${dirs[@]}
285 sudo
/a
/exe
/lnf
/q
/root
/.editor-backups
/q
/root
/.undo-tree-history \
286 /a
/opt
/a
/c
/.emacs.d
$HOME/mw_vars
/k
/backup
/root
287 /a
/bin
/ds
/install-my-scripts
# needed for rootsshsync cronjob
288 sudo
/a
/exe
/lnf
/a
/c
/.vim
/a
/c
/.vimrc
/a
/c
/.gvimrc
/root
292 # vps needs bind group before conflink
299 # this needs to be before installing pacserve so we have gpg conf.
302 if [[ -e /etc
/rootsudoenv
]]; then
303 source /etc
/rootsudoenv
308 ###### bash environment setup
311 source /etc
/profile.d
/environment.sh
312 export LC_USEBASHRC
=t
313 # shellcheck source=./brc
316 $interactive ||
set -x
318 ##### use systemd-resolved for glibc resolutions
322 if [[ ! -L /etc
/nsswitch.conf
]]; then
323 sudo mkdir
-p /etc
/resolved-nsswitch
324 sudo
mv /etc
/nsswitch.conf
/etc
/resolved-nsswitch
325 sudo
ln -sf /etc
/resolved-nsswitch
/nsswitch.conf
/etc
328 f
=/etc
/basic-nsswitch
/nsswitch.conf
329 if [[ ! -e $f ]]; then
330 sudo mkdir
-p ${f%/*}
331 sudo
cp /etc
/nsswitch.conf
$f
332 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files dns myhostname/' $f
336 # je should be able to get along systemd-resolved, but ive had some odd
337 # very intermittent dns failures with spamassassin, it seems it might only
338 # be happening with systemd-resolved, so just use unbound
339 # to make it consistent with the other hosts.
340 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files dns myhostname/' /etc
/nsswitch.conf
341 soff systemd-resolved
342 sudo
ln -sf 127.0.0.1-resolv/stub-resolv.conf
/etc
/resolv.conf
344 # cautious measure to make sure resolution is working
349 # files mdns4_minimal [NOTFOUND=return] dns myhostname
350 # mdns4 is needed for my printer and for bbb webrtc, not sure exactly why.
351 # https://www.freedesktop.org/software/systemd/man/nss-resolve.html#
352 # seems more important than some potential use case.
353 # Interestingly, t9/t10 man page says use files before resolve, debian 10 says the opposite.
354 # removing files makes hostname -f not actually give the fully qualified domain name.
355 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files resolve [!UNAVAIL=return] mdns4_minimal [NOTFOUND=return] myhostname/' /etc
/resolved-nsswitch
/nsswitch.conf
367 "/etc/resolved-nsswitch/nsswitch.conf r,"
368 "/etc/basic-nsswitch/nsswitch.conf r,"
369 # Aug 06 23:09:11 kd audit[3995]: AVC apparmor="DENIED" operation="connect" profile="/usr/bin/freshclam" name="/run/systemd/resolve/io.systemd.Resolve" pid=3995 comm="freshclam" requested_mask="wr" denied_mask="wr" fsuid=109 ouid=101
370 # I dont know if this is quite the right fix, but I saw other sockets
371 # in the nameservice files that were rw, so figured it was ok to add this and it worked.
372 "/run/systemd/resolve/io.systemd.Resolve rw,"
374 f
=/etc
/apparmor.d
/abstractions
/nameservice
375 apparmor_reload
=false
377 for l
in "${lines[@]}"; do
378 if ! grep -qF "$l" $f; then
379 sudo
sed -i "/\/nsswitch.conf/a $l" $f
381 if ! grep -qF "$l" $f; then
382 echo "$0: failed editing $f. investigate"
387 if $apparmor_reload && systemctl is-active apparmor
; then
388 m ser reload apparmor
394 if dpkg
-s -- nscd
&>/dev
/null
; then
395 sudo apt-get
-y remove
--purge --auto-remove nscd
396 sudo systemctl stop nscd ||
: # fails if already stopped
399 # http://strugglers.net/~andy/blog/2020/12/03/starting-services-only-when-the-network-is-ready-on-debiansystemd/
400 if systemctl
cat ifupdown-wait-online.service
&>/dev
/null
; then
401 sudo systemctl
enable ifupdown-wait-online.service
405 # remove line like this: 85.119.82.128 je.iankelling.org je
406 # it messes with hostname -f.
407 sudo
sed -ri "/^127\./n;/[[:space:]]$HOSTNAME\$/d" /etc
/hosts
410 if isdeb
&& [[ $
(debian-codename
) == aramo
]]; then
411 sudo
dd of
=/etc
/apt
/preferences.d
/aramo-jammy-missing
<<'EOF'
412 Package: linux-libc-dev libmysqlclient21
413 Pin: release n=jammy,o=Ubuntu
418 # libfdk just has some patent worries.
419 # https://www.gnu.org/licenses/license-list.en.html#fdk
420 if isdeb
&& [[ $
(debian-codename
) == nabia
]]; then
421 sudo
dd of
=/etc
/apt
/preferences.d
/nabia-focal-missing
<<'EOF'
423 Pin: release n=focal,o=Ubuntu
427 # it has a dependency python-paramiko that should be
428 # python3-paramiko. the backport version is pretty close to the normal
429 # version, so i just set the pin priority low for the backport and it
431 sudo
dd of
=/etc
/apt
/preferences.d
/nabia-backport
<<'EOF'
433 Pin: release a=nabia-backports
440 # to test when these become available in trisquel, copy the package list, remove the * chars, repaplace PACKAGES below
441 # for x in PACKAGES; do hr; e $x; if [[ $x == *- ]]; then s="^$x"; dpkg -l "$x*" | sed '0,/^+++/d'; else s="^$x\$"; fi; aptitude search "~O Trisquel ~n $s"; done
444 #### setup firefox backport
445 ## ian: disabled. backports are not being published atm due to rust packaging issue
447 # codename=$(debian-codename)
448 # if isdebian-stable && has_x; then
449 # s dd of=/etc/apt/sources.list.d/mozilla-iceweasel.list <<EOF
450 # deb http://mozilla.debian.net/ $codename-backports firefox-release
451 # deb-src http://mozilla.debian.net/ $codename-backports firefox-release
454 # # take care of mozilla signing errors in previous command
455 # pi pkg-mozilla-archive-keyring
461 ###### arch aur wrapper setup
463 #https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
464 sudo pacman
-S --noconfirm --needed base-devel jq
465 # pacaur seems to be the best, although it + cower has a few minor bugs,
466 # its design goals seem good, so, going for it.
473 makepkg
-sri --skippgpcheck --noconfirm
482 x
=$
(mktemp
); /usr
/bin
/pacman.conf-insert_pacserve
>$x
483 sudo
dd of
=/etc
/pacman.conf
if=$x; rm $x
484 sudo systemctl
enable pacserve.service
485 sudo systemctl start pacserve.service
489 #### update all packages
490 # shellcheck disable=SC2119 # obvious
494 ###### p1 packages install ######
498 ######## fix evbug bug ######
499 case $
(debian-codename-compat
) in
500 xenial|bionic|focal|jammy
)
501 # noticed in flidas. dunno if it affects any others
502 #https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/240553
503 #https://wiki.debian.org/KernelModuleBlacklisting
504 #common advice when searching is to use /etc/modprobe.d/blacklist.conf,
505 #but that file won't work and will get automatically reverted
506 sudo rmmod evbug ||
: # might not be loaded yet
507 file=/etc
/modprobe.d
/evbug.conf
508 line
="blacklist evbug"
509 if [[ $
(cat $file) != "$line" ]]; then
510 sudo
dd of
=$file status
=none
<<<"$line"
512 sudo update-initramfs
-u
519 #### arch specific early packages
520 case $
(distro-name
) in
522 # pkgfile is like apt-cache
524 sudo pkgfile
--update
529 # enable trim for volume delete, other rare commands
530 sudo
$sed -ri 's/( *issue_discards\b).*/\1 = 1/' /etc
/lvm
/lvm.conf
532 # flidas or so, these units arent built-in
533 if isdeb
&& ! systemctl list-unit-files |
grep ^fstrim.timer
&>/dev
/null
; then
534 sudo
cp /usr
/share
/doc
/util-linux
/examples
/fstrim.
{service
,timer
} /etc
/systemd
/system
537 sudo systemctl
enable fstrim.timer
540 ##### make extra dirs
542 for dir
in /mnt
/{1,2,3,4,5,6,7,8,9} /nocow
/t
; do
543 [[ -e $dir ]] && continue
546 if (( ${#dirs[@]} )); then
547 # mkdir -p on a mounted directory will fail. so will chown if its an ro mount
548 sudo mkdir
-p "${dirs[@]}"
549 sudo chown
$USER:$USER "${dirs[@]}"
553 # disabled temporarily
555 # if home_network; then
556 # sudo teeu /etc/fstab <<'EOF'
557 # /i/w /w none bind,noauto 0 0
558 # /i/k /k none bind,noauto 0 0
560 # if ! mountpoint /kr; then
562 # sudo chown $USER:user2 /kr
564 # if [[ $HOSTNAME == frodo ]]; then
565 # sudo teeu /etc/fstab <<'EOF'
566 # /k /kr none bind,noauto 0 0
569 # sudo teeu /etc/fstab <<'EOF'
570 # frodo:/k /kr nfs noauto 0 0
573 # sudo mkdir -p /i/{w,k}
574 # for dir in /{i,w,k}; do
575 # if mountpoint $dir; then continue; fi # already mounted
577 # sudo chown $USER:$USER $dir
579 # # debian auto mounting of multi-disk encrypted btrfs is busted. It is
580 # # in jessie, and in stretch as of 11/26/2016 I have 4 disks in cryptab,
581 # # based on 3 of those, it creates .device units for /dev/mapper/dev...
582 # # then waits endlessly for them on bootup, after the /dev/mapper disks
583 # # have already been created and exist. todo: create a simple repro
584 # # for this in a vm and report it upstream.
586 # sudo dd of=/root/imount <<'EOF'
588 # [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
589 # set -eE -o pipefail
590 # trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
591 # for dir in /i /k /kr /w; do
592 # if ! mountpoint $dir &>/dev/null && \
593 # awk '{print $2}' /etc/fstab | grep -xF $dir &>/dev/null; then
594 # if awk '{print $3}' /etc/fstab | grep -xF nfs &>/dev/null; then
595 # mount $dir || echo "warning: failed to mount nfs on $dir"
602 # sudo chmod +x /root/imount
603 # sudo dd of=/etc/systemd/system/imount.service <<EOF
605 # Description=Mount /i and related mountpoints
606 # Before=syncthing@$USER.service
610 # ExecStart=/root/imount
613 # RequiredBy=syncthing@$USER.service
614 # # note /kr needs networking, this target is the simplest way to
615 # # time it when the network should be up, but not do something
616 # # dumb like delay startup until the network is up. It happens
617 # # at some time after network.target
618 # WantedBy=multi-user.target
620 # sudo systemctl daemon-reload # needed if the file was already there
621 # sudo systemctl enable imount.service
622 # sudo systemctl start imount.service
627 # a nocow dir that is common to multiple distros installed on the same system
630 if ! mountpoint
$dir; then
631 subvol
=/mnt
/root
/nocow
632 if [[ ! -e $subvol ]]; then
633 sudo btrfs subvolume create
$subvol
634 sudo chown root
:1000 $subvol
635 sudo
chattr +C
$subvol
638 first_root_crypt
=$
(awk '$2 == "/" {print $1}' /etc
/mtab
)
639 sudo teeu
/etc
/fstab
<<EOF
640 $first_root_crypt /nocow btrfs noatime,subvol=nocow$( (( $(nproc) > 2)) && echo ,compress=zstd ) 0 0
643 sudo chown
$USER:$USER $dir
652 sudo teeu
/etc
/fstab
<<'EOF'
653 /dev/mapper/crypt_dev_ata-Samsung_SSD_870_QVO_8TB_S5VUNG0N900656V-part7 /d btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,compress=zstd,subvol=d 0 0
654 /d/m /i none bind,compress=zstd 0 0
656 if ! mountpoint
/d
&>/dev
/null
; then
658 if [[ -d /mnt
/r
7/d
]]; then
662 if ! mountpoint
/i
&>/dev
/null
; then
668 sudo teeu
/etc
/fstab
<<'EOF'
669 /dev/mapper/crypt_dev_ata-ata-Hitachi_HDS722020ALA330_JK1121YAG7SXWS-part1 /i btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,subvol=i 0 0
671 if ! mountpoint
/i
&>/dev
/null
; then
673 if [[ -d /mnt
/i
/i
]]; then
681 sudo systemctl disable systemd-networkd
689 # disable crash report annoying dialogs.
690 sudo
dd of
=/etc
/default
/apport
<<<'enabled=0'
693 ##### install laptop hardware packages
694 if tp || x2 || x3 || bo || sy; then
700 # the exact packages that task-laptop would install, since ubuntu
701 # doesn\'t have this virtual in practice package.
702 pi avahi-autoipd bluetooth powertop iw wireless-tools wpasupplicant
704 # todo: other distros unknown
710 # sway not packaged for t9, not bothering to build it yet since
711 # i3 doesnt seem to tear and stutter on video anymore.
712 if [[ $codename == buster ]]; then
721 case $(distro-name) in
722 trisquel|ubuntu|debian)
727 # recommends gets us geoclue (for darkening automatically at night i assume),
728 # which recommends modemmanager, which is annoying to fix for the model01 keyboard.
729 # commented because I dont use it much, and in nabia its named changed to redshift-gtk
730 #pi --no-install-recommends gtk-redshift
732 ##### setup X autostart
733 # install for multiple display managers in case we use one
734 dir=/etc/X11/xinit/xinitrc.d/
736 sudo cp /a/bin/distro-setup/desktop-20-autostart.sh $dir
738 ## disabled since i'm not using gdm atm
740 # sudo mkdir -p $dir/PostLogin
741 # sudo cp /a/bin/distro-setup/desktop-20-autostart.sh $dir/PostLogin/Default
742 sudo mkdir -p /etc/lightdm/lightdm.conf.d
743 # etiona lightdm.log:
744 # [SeatDefaults] is now called [Seat:*], please update this configuration
745 sudo dd of=/etc/lightdm/lightdm.conf.d/12-iank.conf <<'EOF'
747 # display-setup-script=/a/bin/ds/lightdm-start
748 session-setup-script=/a/bin/distro-setup/desktop-20-autostart.sh
752 # originally used xkbcomp, documented in input-setup.sh, this doesnt
753 # work under wayland, but its still useful for creating the config,
754 # then modifying the system files.
755 sudo sed -i.orig '/key *<KPMU> *{/,/}/s/KP_Multiply/underscore/g' /usr/share/X11/xkb/symbols/keypad
757 ##### basic graphical packages
758 pi konsole suckless-tools ssh-askpass
766 # emacs git build was broken last time i checked,
770 makepkg -si --noconfirm
773 pi hunspell hunspell-en
776 /a/bin/buildscripts/emacs
777 /a/bin/buildscripts/mu4e
779 /a/bin/buildscripts/emacs --no-r
780 /a/bin/buildscripts/mu4e --no-r
783 # the first pup command can kill off our /etc/ mod, so rerun this
784 /a/exe/ssh-emacs-setup
787 if [[ $HOSTNAME == kd ]] && ! mountpoint /d &>/dev/null; then
789 # if this is a fresh reinstall, need to run something like this
792 btrbk archive /mnt/rust1/btrbk /mnt/r7/btrbk
793 btrfs sub snap /mnt/r7/btrbk/LATEST /mnt/r7/d
799 echo 0 >~/.local/distro-begin
800 echo "$0: $(date): ending now"
801 echo "exiting with status 0"