A flake for running Misskey under NixOS
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Dee 95949b004f readme: fix example 1 year ago
module nixosModule: actually use the misskey user for the systemd unit 2 years ago
pkg packages.misskey: 12.94.1 → 12.95.0 2 years ago
.gitignore Initial commit 🎉 2 years ago
LICENSE Initial commit 🎉 2 years ago
README.md readme: fix example 1 year ago
flake.lock packages.misskey: 12.88.0 → 12.89.2 2 years ago
flake.nix Initial commit 🎉 2 years ago


Nix Flake for Misskey

This is a Nix flake for Misskey. It can be used to deploy Misskey, a decentralized, ActivityPub-based microblogging platform, on NixOS.

This is an unofficial effort, not associated with the Misskey project. Please do not report any issues encountered when deploying Misskey via this method to the upstream Misskey project.



To use the Misskey module provided by this flake, add this flake as an input to the flake.nix used for your system configurations, and then import nixosModule from it.

For example, your flake.nix might look something like this:

  inputs = {
    misskey.url = "github:DeeUnderscore/misskey-flake";

  outputs = {self, nixpkgs, misskey}: {
    nixosConfigurations.exampleBox = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ ./exampleBox/configuration.nix ];
      specialArgs = { 
          inherit misskey;

Then, in your confiuguration.nix, you can import the module like so:

{ config, pkgs, misskey, ...}:
  imports = [


For detailed options provided by the module, see the module source file. There is currently no generated documentation.

services.misskey.settings follows the Misskey config file structure.

Database setup

The module supplied by the flake does not provide a createLocally option for the database. Additionally, there is no support for peer authentication, so you will most likely need to set a password for the Misskey user manually.

To do this, add a Misskey user to your Postgresql configuration in your configuration.nix:

services.postgresql = {
    enable = true;
    authentication = ''
      host   misskey   misskey password

    ensureDatabases = [

    ensureUsers = [
        name = "misskey";
        ensurePermissions."DATABASE misskey" = "ALL PRIVILEGES";

And then, imperatively:

$ sudo -u postgres psql 
postgres=# ALTER ROLE misskey WITH PASSWORD 'passwordGoesHere';


The contents of this repository are available under the MIT license. See LICENSE for full text.