diff --git a/arch-root/install.sh b/arch-root/install.sh index 70c85b3..10198fd 100755 --- a/arch-root/install.sh +++ b/arch-root/install.sh @@ -6,10 +6,11 @@ PACKAGES=( linux base linux-firmware lvm2 sudo polkit # base pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management - openssh rsync strace sysstat htop screen man-db which # system + openssh rsync strace sysstat htop screen man-db which dnsutils # system nodejs dash jq # runtime qemu-system-x86 # virt + postgresql #db rlwrap fzf # shell helpers vifm vim less # nav & edit diff --git a/arch-user/bin/postgres/start.sh b/arch-user/bin/postgres/start.sh new file mode 100755 index 0000000..737eb0d --- /dev/null +++ b/arch-user/bin/postgres/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -eo pipefail + +if [ "$1" != "foreground" ]; then + exec ~/.local/bin/screen/detach.sh postgres "$0" foreground +fi + +version="$(pg_config --version | sed -n 's/^PostgreSQL \([0-9]*\).*/\1/p')" +export PGDATA=~/know/db/"$version" + +mkdir -p "$PGDATA" +if [ ! -f "$PGDATA/postgresql.conf" ]; then + initdb +fi + +postgres -c "unix_socket_directories=/run/user/$(id -u)" -c "listen_addresses=" -c "io_method=sync" diff --git a/arch-user/bin/psql.sh b/arch-user/bin/psql.sh new file mode 100755 index 0000000..f00f9bb --- /dev/null +++ b/arch-user/bin/psql.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +psql -h "/run/user/$(id -u)" "$1" diff --git a/arch-user/config/cliphist/config b/arch-user/config/cliphist/config new file mode 100644 index 0000000..c260fd9 --- /dev/null +++ b/arch-user/config/cliphist/config @@ -0,0 +1 @@ +max-items 50