Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add script to force-verify tranquil users

+30
+30
scripts/verify-tranquil-user.rcsh
··· 1 + #!/usr/bin/env rc 2 + 3 + fn error { 4 + echo $* >[1=2] 5 + } 6 + 7 + if (~ $1 ()) { 8 + error Must specify a user 9 + } 10 + user=$1 11 + shift 12 + 13 + domain=.pds.ngp.computer 14 + if (! ~ $1 ()) { 15 + error Using $1 as domain 16 + domain=$1 17 + shift 18 + } 19 + sql=`{cat <<EOF 20 + UPDATE users 21 + SET email_verified = true, 22 + updated_at = NOW() 23 + WHERE handle = '$user^$domain'; 24 + EOF 25 + } 26 + 27 + sudo -u postgres psql tranquil-pds \ 28 + -c $"sql 29 + 30 + #" done!