Funkwhale
Federated platform for audio streaming, exploration, and publishing.
Declared in: projects/Funkwhale/default.nix
Try the service in a VM
-
Install Nix
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ pacman --sync --refresh --noconfirm curl git jq nix
-
Download a configuration file
# default.nix { ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { }, }: ngipkgs.demo-vm ( { services.funkwhale = { enable = true; configureNginx = true; settings = { FUNKWHALE_HOSTNAME = "localhost"; }; }; } )
-
Enable binary substituters
- Bash
-
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ngi.cachix.org-1:n+CAL72ROC3qQuLxIHpV+Tw5t42WhXmMhprAGkRSrOw='
-
Build and run a virtual machine
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
- Bash
-
$ nix-build ./default.nix && ./result
-
Usage Instructions
-
Create your initial superuser account in the shell:
cd / && sudo -u funkwhale funkwhale-manage fw users create --superuser -
You can log into the website at http://localhost:12345.
-
Options
services.funkwhale
-
Configure nginx as a reverse proxy for Funkwhale.
You will still need to configure SSL/HTTPS.
- Type:
boolean- Default:
false- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Create a local PostgreSQL database for Funkwhale.
- Type:
boolean- Default:
true- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Create a local Redis server for Funkwhale.
- Type:
boolean- Default:
true- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Whether to enable Funkwhale, a federated audio platform.
- Type:
boolean- Default:
false- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
The funkwhale package to use.
- Type:
package- Default:
pkgs.funkwhale- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Secret environment variable settings. These overwrite
services.funkwhale.settings. See https://docs.funkwhale.audio/administrator/configuration/env-file.html.Example:
DJANGO_SECRET_KEY="some-very-increadibly-secret-key" TYPESENSE_API_KEY="some-other-very-increadibly-super-secret-key"DJANGO_SECRET_KEYwill be auto-generated if not set here.- Type:
null or absolute path- Default:
null- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
See https://docs.funkwhale.audio/administrator/configuration/env-file.html.
Secret settings such as
DJANGO_SECRET_KEYshould go inservices.funkwhale.secretEnvironmentFile.You will need to manually create your first user account. Example:
sudo -u funkwhale funkwhale-manage fw users create --superuser. See https://docs.funkwhale.audio/administrator/manage-script/users.html for more information.- Type:
open submodule of attribute set of (signed integer or string or boolean or absolute path or list of (signed integer or string or boolean or absolute path))- Default:
{ }- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Name of the PostgreSQL database.
- Type:
string- Default:
"funkwhale"- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Host or address to bind the API socket to.
- Type:
string- Default:
"127.0.0.1"- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Port to bind the API socket to.
- Type:
16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
5000- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Hostname of your Funkwhale pod.
- Type:
string- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
-
Protocol end users will use to access your pod.
- Type:
one of "http", "https"- Default:
"http"- Declared in:
- projects/Funkwhale/services/funkwhale/module.nix
services.funkwhale.configureNginx
services.funkwhale.createDatabaseLocally
services.funkwhale.createRedisLocally
services.funkwhale.enable
services.funkwhale.package
services.funkwhale.secretEnvironmentFile
services.funkwhale.settings
services.funkwhale.settings.DATABASE_NAME
services.funkwhale.settings.FUNKWHALE_API_IP
services.funkwhale.settings.FUNKWHALE_API_PORT
services.funkwhale.settings.FUNKWHALE_HOSTNAME
services.funkwhale.settings.FUNKWHALE_PROTOCOL
Examples
Basic local configuration
{ services.funkwhale = { enable = true; configureNginx = true; settings = { FUNKWHALE_HOSTNAME = "localhost"; }; }; }
Declared in: projects/Funkwhale/services/funkwhale/examples/basic.nix
Metadata
This project is funded by NLnet through these subgrants:
- Commons
- Funkwhale-AP
- Entrust
- FunkWhale-Federation
- Review
- Funkwhale
Related links: