Add documentation for all scripts, move Nix store cleanup to minimize amount of time between upgrade and reboot

This commit is contained in:
Anthony Wang 2024-01-05 19:05:32 +00:00
parent a31be33f56
commit 898bf87450
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ
4 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,5 @@
#!/usr/bin/bash
# Search the posts in the Mastodon database for a string
sudo -u mastodon PAGER=less psql -c "select * from statuses where text ilike '%$*%'"

View file

@ -1,5 +1,8 @@
#!/bin/bash
# Add the server's public IPv4 address to NetworkManager
# Designed to be used with https://git.exozy.me/exozyme/porkbun-dynamic-dns-python/
if [ "$1" = "A" ]; then
nmcli con mod 'Wired connection 1' ipv4.addresses "$2"
systemctl restart NetworkManager

View file

@ -1,6 +1,6 @@
#!/usr/bin/python
# Graphs the number of installed packages over time by parsing /var/log/pacman.log
# Graph the number of installed packages over time by parsing /var/log/pacman.log
from datetime import datetime
from matplotlib import pyplot as plt

10
upgrade
View file

@ -1,6 +1,10 @@
#!/usr/bin/fish
# Performs a full system upgrade
# Perform a full system upgrade
# Clean up Nix store
sudo nix-collect-garbage
sudo nix-store --optimize
# Upgrade packages
paru
@ -18,7 +22,3 @@ export NEXTCLOUD_PHP=/usr/bin/php
export NEXTCLOUD_PHP_CONFIG=/etc/php/php.ini
occ upgrade
occ app:update --all
# Clean up Nix store
sudo nix-collect-garbage
sudo nix-store --optimize