Compare commits
10 Commits
3c2cb178a5
...
8f3b979e99
Author | SHA1 | Date | |
---|---|---|---|
8f3b979e99 | |||
4932bb5b1f | |||
d4f3bb8dfb | |||
278c88adf6 | |||
34c7cc95da | |||
f817cf163b | |||
dbce421b3d | |||
569bc59db6 | |||
3fb48e75b6 | |||
2fe2884651 |
|
@ -7,8 +7,8 @@ apt-get update
|
|||
|
||||
# Networking & Firewall
|
||||
apt-get -y install network-manager netcat-openbsd rsync curl wget \
|
||||
avahi-daemon net-tools ufw whois ifupdown- connman- cmst- \
|
||||
netcat-traditional-
|
||||
avahi-daemon net-tools ufw whois network-manager-openvpn sipcalc \
|
||||
ifupdown- connman- cmst- netcat-traditional-
|
||||
|
||||
if [ -w /etc/network/interfaces ]; then
|
||||
mv /etc/network/interfaces /etc/network/interfaces.OLD
|
||||
|
@ -36,6 +36,14 @@ until nc -w 5 -z mirror.swagg.net 80; do
|
|||
sleep 5
|
||||
done
|
||||
|
||||
# NTP
|
||||
cat >> /etc/systemd/timesyncd.conf <<'EOF'
|
||||
NTP=pfswagg.swaggnet.real swaggcore0.swaggnet.real
|
||||
FallbackNTP=time-a-g.nist.gov time-b-g.nist.gov time-c-g.nist.gov time-d-g.nist.gov time-e-g.nist.gov
|
||||
EOF
|
||||
|
||||
systemctl restart systemd-timesyncd
|
||||
|
||||
# Shared drives
|
||||
if grep -q 'swaggnet\.real' /etc/resolv.conf; then
|
||||
apt-get -y install cifs-utils smbclient autofs
|
||||
|
@ -74,7 +82,7 @@ apt-get -y install git libsecret-1-0 libsecret-1-dev build-essential vim \
|
|||
elpa-dockerfile-mode elpa-web-mode elpa-yaml-mode docker-compose-
|
||||
|
||||
# Need this for rootless podman
|
||||
if grep -q '^daniel' /etc/shadow; then
|
||||
if grep -q '^daniel:' /etc/shadow; then
|
||||
loginctl enable-linger daniel
|
||||
fi
|
||||
|
||||
|
@ -90,41 +98,48 @@ if [ -d /var/log/journal ]; then
|
|||
fi
|
||||
|
||||
# Firmware (if available)
|
||||
if apt-get -s install firmware-linux-nonfree 2>&1 > /dev/null; then
|
||||
if apt-get -s install firmware-linux-nonfree > /dev/null 2>&1; then
|
||||
apt-get -y install firmware-linux-nonfree
|
||||
fi
|
||||
|
||||
# Various things
|
||||
apt-get -y install unifont bsdgames fortune-mod fortunes-bofh-excuses \
|
||||
fortunes-mario fortunes fortunes-min neofetch screen beep apt-file \
|
||||
htop iftop lm-sensors
|
||||
htop iftop lm-sensors gcal pinentry-curses
|
||||
|
||||
apt-file update
|
||||
|
||||
# systemd cope
|
||||
perl -i.bak -pe 's/^#// if /Timeout/ && /\ds$/' /etc/systemd/system.conf
|
||||
|
||||
# fwupd
|
||||
apt-get -y install udisks2 fwupd
|
||||
|
||||
# Set locale for date/time display
|
||||
localectl set-locale LC_TIME='en_GB.UTF-8'
|
||||
|
||||
# Stop here if there's no graphical UI
|
||||
if [ "$(systemctl is-active display-manager)" = 'inactive' ]; then
|
||||
apt-get -y autoremove
|
||||
exit
|
||||
fi
|
||||
|
||||
# fwupd
|
||||
apt-get -y install udisks2 fwupd
|
||||
|
||||
# User-specific DESKTOP stuff
|
||||
if who -u | grep '\(:0\)' | grep -q '^daniel'; then
|
||||
# PipeWire
|
||||
apt-get -y install wireplumber libspa-0.2-bluetooth pipewire-media-session-
|
||||
|
||||
if grep -q '^daniel' /etc/shadow; then
|
||||
apt-get -y install wireplumber libspa-0.2-bluetooth \
|
||||
pipewire-media-session- pulseaudio-
|
||||
apt-mark hold pulseaudio
|
||||
systemctl --user -M daniel@ enable wireplumber.service
|
||||
fi
|
||||
|
||||
# Flatpak
|
||||
apt-get -y install flatpak
|
||||
|
||||
flatpak remote-add --if-not-exists flathub \
|
||||
'https://flathub.org/repo/flathub.flatpakrepo'
|
||||
su daniel -c 'flatpak --user remote-add --if-not-exists flathub \
|
||||
"https://flathub.org/repo/flathub.flatpakrepo"'
|
||||
su daniel -c 'flatpak -y install com.slack.Slack im.riot.Riot \
|
||||
com.discordapp.Discord com.sindresorhus.Caprine \
|
||||
com.bitwarden.desktop'
|
||||
fi
|
||||
|
||||
# Various DESKTOP things
|
||||
apt-get -y install lxqt-archiver caffeine picom vlc thunderbird redshift \
|
||||
|
@ -135,8 +150,18 @@ apt-get -y install lxqt-archiver caffeine picom vlc thunderbird redshift \
|
|||
transmission-qt liblxqt-backlight-helper xserver-xorg-video-intel- \
|
||||
openbox obconf-qt menu xfwm4-
|
||||
|
||||
flatpak -y install com.bitwarden.desktop com.discordapp.Discord \
|
||||
com.sindresorhus.Caprine com.slack.Slack im.riot.Riot
|
||||
# Steam (if available)
|
||||
(cd /tmp
|
||||
# I can't do a simulated install due to the multilib requirement
|
||||
if apt-get download steam-installer > /dev/null 2>&1; then
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-file update
|
||||
|
||||
apt-get -y install steam-installer
|
||||
|
||||
rm ./steam-installer*.deb
|
||||
fi)
|
||||
|
||||
# Laptop stuff
|
||||
if ! command -v laptop-detect > /dev/null 2>&1; then
|
||||
|
@ -147,18 +172,5 @@ if laptop-detect; then
|
|||
apt-get -y install tlp modemmanager modem-manager-gui powertop-
|
||||
fi
|
||||
|
||||
# Steam (if available)
|
||||
(cd /tmp
|
||||
# I can't do a simulated install due to the multilib requirement
|
||||
if apt-get download steam-installer 2>&1 > /dev/null; then
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-file update
|
||||
|
||||
apt-get -y install steam-installer
|
||||
|
||||
rm ./steam-installer*.deb
|
||||
fi)
|
||||
|
||||
# Clean up before exiting
|
||||
apt-get -y autoremove
|
||||
|
|
|
@ -6,8 +6,9 @@ set -e
|
|||
apt-get update
|
||||
|
||||
# Networking & Firewall
|
||||
apt-get -y install network-manager netcat-openbsd rsync curl wget \
|
||||
net-tools ufw whois ifupdown- connman- cmst- netcat-traditional-
|
||||
apt-get -y install network-manager netcat-openbsd rsync curl wget ufw \
|
||||
whois net-tools network-manager-openvpn sipcalc ifupdown- connman- \
|
||||
cmst- netcat-traditional-
|
||||
|
||||
if [ -w /etc/network/interfaces ]; then
|
||||
mv /etc/network/interfaces /etc/network/interfaces.OLD
|
||||
|
@ -23,7 +24,7 @@ ufw limit ssh
|
|||
ufw --force enable
|
||||
|
||||
# Disallow root login via ssh
|
||||
echo 'PermitRootLogin no' > /etc/ssh/sshd_config.d/permit_root_login
|
||||
echo 'PermitRootLogin no' > /etc/ssh/sshd_config.d/permit_root_login.conf
|
||||
systemctl restart sshd
|
||||
|
||||
# Make sure NetworkMangler is doing its thing
|
||||
|
@ -55,6 +56,9 @@ fi
|
|||
# Various things
|
||||
apt-get -y install unifont bsdgames fortune-mod fortunes-bofh-excuses \
|
||||
fortunes-mario fortunes fortunes-min neofetch screen apt-file \
|
||||
htop iftop
|
||||
htop iftop gcal pinentry-curses
|
||||
|
||||
apt-file update
|
||||
|
||||
# Set locale for date/time display
|
||||
localectl set-locale LC_TIME='en_GB.UTF-8'
|
||||
|
|
Loading…
Reference in New Issue
Block a user