$(debian-codename-compat) \
stable"
p update
- pi docker-ce
- sgo docker
+ # docker eats up a fair amount of cpu when doing nothing, so don't enable it unless
+ # we really need it.
+ pi-nostart docker-ce
+ case $HOSTNAME in
+ li|lj) sgo docker ;;
+ esac
# other distros unknown
fi
### end docker install ####
############### !!!!!!!!!!!!!!!!!
############### manual steps:
- # only following 2 people atm, so not bothering to figure out backups
+ # only following a few people atm, so not bothering to figure out backups
# when mastodon has not documented it at all.
#
# fsf@status.fsf.org
# alo would be nice if erc supported
# https://wiki.znc.in/self-message
# https://wiki.znc.in/Query_buffers \
- #
+ #
s useradd --create-home -d /var/lib/znc --system --shell /sbin/nologin --comment "Account to run ZNC daemon" --user-group znc || [[ $? == 9 ]] # 9 if it exists already
chmod 700 /var/lib/znc
s chown -R znc:znc /var/lib/znc
s add-apt-repository -y ppa:ansible/ansible
p update
fi
- pi ansible
+ s pip install --upgrade pip
+ # newer 2.7 versions have a bug that incorrectly detects trisquel version. fixed once 2.8 arrives
+ # in 2019
+ pip install --user ansible=2.7.4
+ #pi ansible
;;
esac
####### begin misc packages ###########
+# sakura config is owned by ian
reset-sakura
-sudo -u traci -i reset-sakura
reset-konsole
sudo -u traci -i reset-konsole
+# traci xscreensaver we don't want to reset
reset-xscreensaver
# others unknown
esac
+case $(debian-codename) in
+ # needed for debootstrap scripts for fai since fai requires debian
+ flidas)
+ s dd of=/etc/apt/preferences.d/flidas-xenial <<EOF
+Package: *
+Pin: release a=xenial
+Pin-Priority: -100
+
+Package: *
+Pin: release a=xenial-updates
+Pin-Priority: -100
+EOF
+ s dd of=/etc/apt/sources.list.d/xenial.list 2>/dev/null <<EOF
+deb http://us.archive.ubuntu.com/ubuntu/ xenial main
+deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main
+EOF
+ curl http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg | s apt-key add -
+ p update
+
+ t=$(mktemp -d)
+ cd $t
+ s dd of=/etc/apt/preferences.d/flidas-xenial <<EOF
+Package: debootstrap
+Pin: release a=xenial
+Pin-Priority: 1001
+
+Package: debootstrap
+Pin: release a=xenial-updates
+Pin-Priority: 1001
+EOF
+ aptitude download debootstrap
+ ex *
+ ex data.tar.gz
+ s cp ./usr/share/debootstrap/scripts/* /usr/share/debootstrap/scripts
+
+ ;;
+esac
+
# /run and /dev/shm are listed as required for pulseaudio. All 4 in the group
# listed in the default config as suggested.
# /run/usr/1000 i noticed was missing for pulseaudio
EOF
mkschroot() {
+ distro=$1
+ shift
+ case $distro in
+ ubuntu)
+ repo=http://archive.ubuntu.com/ubuntu/
+ ;;
+ debian)
+ repo=http://deb.debian.org/debian/
+ ;;
+ esac
n=$1
shift
apps=($@)
cd; s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]}
else
s mkdir -p $d
- s debootstrap $n $d http://deb.debian.org/debian/
+
+ s debootstrap $n $d $repo
cd; s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]}
fi
s cp -P {,$d}/etc/localtime
# for my roommate
case $distro in
trisquel)
- mkschroot stretch firefox-esr pulseaudio chromium
+ mkschroot debian stretch firefox-esr pulseaudio chromium
;;
esac
s mkdir -p /nocow/user
s chown $USER:$USER /nocow/user
case $distro in
- debian)
- case $(debian-codename) in
- jessie)
- pi anki
- ;;
- *)
- mkschroot jessie anki pulsaudio mplayer
- ;;
- esac
- ;;
trisquel|ubuntu)
pi anki
;;
sgo org.cups.cupsd.service
;;
debian|trisquel|ubuntu)
+ pi cups
s gpasswd -a $USER lpadmin # based on ubuntu wiki
spa hplip
;;
# in arch, I had to pick out the 6L driver.
-case $distro in
- trisquel|ubuntu|debian) pi --no-install-recommends mairix notmuch ;;
- fedora|arch) spa mairix notmuch ;;
-esac
-
# allow user to run vms, from debian handbook
for x in iank traci; do s usermod -a -G libvirt,kvm $x; done
# bridge networking as user fails. google lead here, but it doesn\'t work:
########### misc stuff
+# make networkmanager use resolvconf instead of its own dnsmasq which
+# conflicts with the normal dnsmasq package.
+f=/etc/NetworkManager/NetworkManager.conf
+m=$(md5sum $f)
+s sed -ri '/ *\[main\]/,/^ *\[[^]]+\]/{/^\s*dns[[:space:]=]/d}' $f
+if [[ $m != $(md5sum $f) ]]; then
+ srestart NetworkManager
+fi
+
+# make my /etc/fonts/conf.d/ get used.
+# I have a new sans-serif font there because the default one
+# displays l and I as the same char, grrrrr.
+s fc-cache
/a/bin/distro-setup/mymimes
;;
esac
-
+# networkmanager has this nasty behavior on flidas: if the machine
+# crashes with dnsmasq running, on subsequent boot, it adds an entry to
+# resolvconf for 127.0.0.1 in some stupid attempt to restore
+# nameservers.
+# This can be manually fixed by stoping dnsmasq,
+# then based on whats in /run/dnsmasq/, i see we can run
+# s resolvconf -d NetworkManager
+# oh ya, and stoping NetworkManager leaves this crap behind without cleaning it up.
+ser stop NetworkManager
+ser disable NetworkManager
if [[ $HOSTNAME == frodo ]]; then