A flake for Affine. Would be interesting to add to nixpkgs
Find a file
2026-10-09 14:47:05 +13:00
patches patch: graphQL schema in memory 2026-09-19 00:07:54 +12:00
.gitignore Initial Commit 2025-01-21 23:38:19 -05:00
flake.lock flake: update 2026-10-08 14:45:41 +13:00
flake.nix cleanup 2026-09-28 17:40:54 +13:00
missing-hashes.json First build ! 2026-09-16 14:56:32 +12:00
module.nix pgsql: try to fix pool overload 2026-10-03 11:31:33 +13:00
options.nix cleanup 2026-09-28 17:40:54 +13:00
package.nix tests: add 2026-10-09 14:47:05 +13:00
README.md readme: trailing spaces 2026-09-22 17:34:07 +12:00
shell.nix firs-shot 2026-09-22 15:26:35 +12:00

Nix Affine

Nix module to self-host Affine.

Installation

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

    affine = {
      url = "git://git.vagahbond.com/vagahbond/nix-affine.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    {
      self,
      nixpkgs,
      affine,
      ...
    }: {
        nixosConfigurations.my-machine = nixpkgs.lib.nixosSystem {
          system = "x86_64-linux";
          modules = [
            {
              services.affine-server = {
                enable = true;
                package = affine.packages.default;
                settings.server.host = "affine.example.com";
                settings.server.port = 3210;
                settings.server.https = true;
              };
            }
          ];
        };
    }

Look into options.nix for more options.

Building package

Beware, as Affine is going to be built from source on your machine.

It takes at least 15 gigs of ram and a decent CPU.

Solutions to that include:

  • NixBuild
  • Including this package in nixpkgs

I intend to PR this package and module to nixpkgs but I need to try it out for a while first.

Do not hesitate to open an issue or a PR.