From 8a6f835acb621cacabb0a3d158c26a0fcacf9e7d Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 2 Dec 2022 16:31:01 +0100 Subject: mastodon: add create-mastodon-user helper --- krebs/2configs/mastodon.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs') diff --git a/krebs/2configs/mastodon.nix b/krebs/2configs/mastodon.nix index 86e2ec437..145b383ed 100644 --- a/krebs/2configs/mastodon.nix +++ b/krebs/2configs/mastodon.nix @@ -36,5 +36,11 @@ (pkgs.writers.writeDashBin "tootctl" '' sudo -u mastodon /etc/profiles/per-user/mastodon/bin/mastodon-env /etc/profiles/per-user/mastodon/bin/tootctl "$@" '') + (pkgs.writers.writeDashBin "create-mastodon-user" '' + set -efu + nick=$1 + /run/current-system/sw/bin/tootctl accounts create "$nick" --email "$nick"@krebsco.de --confirmed + /run/current-system/sw/bin/tootctl accounts approve "$nick" + '') ]; } -- cgit v1.2.3