There are now official docs, so follow those as they'll be up-to-date and easier to follow.
package main | |
import ( | |
"errors" | |
"net/http" | |
"strconv" | |
"strings" | |
"time" | |
"github.com/dgrijalva/jwt-go" |
Mastodon can store its assets in Amazon S3 (it speaks the S3 protocol). But it does not, by default, speak to Backblaze B2.
There are a couple of reasons why you might want that:
- you already know and trust B2
- it's cheaper
- you do not want to make your instance dependent on AWS
- etc.
A manner of replicating the functionality of switch
and case
in other languages using variable type arguments
to Python's except
keyword.
Python's except
keyword takes as an argument either a type or tuple of types specifying what exceptions
to capture (you can also bind the exception object to a variable, but we don't care about that right now.) it functions
like so:
try:
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/docker/cli/cli/connhelper" | |
"github.com/docker/docker/api/types" | |
"github.com/docker/docker/client" | |
"net/http" | |
"os" |
version: "3.5" | |
# Variables to fill in: | |
# Line 23: <LETSENCRYPT_MAIL_ADDRESS> - your mail address for contact with Let's Encrypt | |
# Line 36: <TRAEFIK_DASHBOARD_ADMIN_PASSWORD> - MD5 hash of your password (use http://www.htaccesstools.com/htpasswd-generator/) | |
# Line 54: <POSTGRES_PASSWORD> - the password for the postgres db. Use the same during mastodon:setup! | |
# Lines 31, 86, 111: <DOMAIN> - e.g. social.yourdomain.com (Must have an A record pointing to your box' IP) (AAAA for IPv6 ;) | |
services: | |
traefik: |
Here are my working notes on getting a system up and running.
WARNING: You can run into a hidden problem that will prevent a correct partition setup and /etc/nixos/configuration.nix
from working: if you are setting up a UEFI system, then you need to make sure you boot into the NixOS installation from the UEFI partition of the bootable media. You may have to enter your BIOS boot selection menu to verify this. For example, if you setup a NixOS installer image on a flash drive, your BIOS menu may display several boot options from that flash drive: choose the one explicitly labeled with “UEFI”.
I used these resources: