summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/mastodon.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-12-02 16:31:01 +0100
committerlassulus <lassulus@lassul.us>2022-12-02 16:31:01 +0100
commit8a6f835acb621cacabb0a3d158c26a0fcacf9e7d (patch)
treeb0c454a3f69611aeaff16e9b35e113182ae8ce49 /krebs/2configs/mastodon.nix
parent2d5f0db519c70c5f6340d546612d5d3daec3d2be (diff)
mastodon: add create-mastodon-user helper
Diffstat (limited to 'krebs/2configs/mastodon.nix')
-rw-r--r--krebs/2configs/mastodon.nix6
1 files changed, 6 insertions, 0 deletions
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"
+ '')
];
}