Compare commits

...

10 Commits

Author SHA1 Message Date
8f3b979e99 Fuckin finally 2024-04-12 20:49:10 -04:00
4932bb5b1f Fix stupid regex 2024-01-03 14:10:36 -05:00
d4f3bb8dfb Add ncurses thing for GPG 2023-12-31 16:37:49 -05:00
278c88adf6 Stupid pulseaudio 2023-11-24 13:51:24 -05:00
34c7cc95da Change up user matching stuff 2023-09-11 21:36:12 -04:00
f817cf163b Fix whoops 2023-09-11 20:07:48 -04:00
dbce421b3d fix some things 2023-09-11 18:32:52 -04:00
569bc59db6 add mooar thing 2023-09-11 17:23:25 -04:00
3fb48e75b6 do NTP 2023-09-03 02:12:59 -04:00
2fe2884651 lmao whoopsie 2023-09-02 23:45:25 -04:00
2 changed files with 53 additions and 37 deletions

View File

@ -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,42 +98,49 @@ 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
# PipeWire
apt-get -y install wireplumber libspa-0.2-bluetooth pipewire-media-session-
if grep -q '^daniel' /etc/shadow; then
# 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- pulseaudio-
apt-mark hold pulseaudio
systemctl --user -M daniel@ enable wireplumber.service
# Flatpak
apt-get -y install flatpak
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
# Flatpak
apt-get -y install flatpak
flatpak remote-add --if-not-exists flathub \
'https://flathub.org/repo/flathub.flatpakrepo'
# Various DESKTOP things
apt-get -y install lxqt-archiver caffeine picom vlc thunderbird redshift \
kitty libopengl-xscreensaver-perl xscreensaver-data-extra \
@ -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

View File

@ -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'