Find a file
2024-12-03 22:05:01 +00:00
analytics.nix Add 'wants network-online.target' 2024-12-03 21:55:13 +00:00
flake.lock First commit - move the chobble server stuff out to its own flake 2024-11-29 12:51:13 +00:00
flake.nix Remove empty log blog 2024-12-03 22:05:01 +00:00
README.md Better readme 2024-11-29 12:55:07 +00:00

chobble-server

A NixOS module for running a server with Forgejo (git hosting), Caddy (reverse proxy), and static site hosting.

Features

  • Git hosting with Forgejo
  • Reverse proxy with Caddy
  • Static site hosting with automated builds
  • Service monitoring with failure notifications via ntfy.sh
  • Restricted SSH access by IP

Usage

Add to your flake inputs:

{
  inputs.chobble-server.url = "git+https://git.chobble.com/chobble/chobble-server";
}

Basic config example:

{
  imports = [ chobble-server.nixosModules.default ];

  services.chobble-server = {
    enable = true;
    baseDomain = "example.com";          # Your domain name
    ntfyAddress = "ntfy.sh/your-topic";  # Where to send failure notifications
    myAddress = "1.2.3.4";               # Your IP (for SSH access)

    # Static sites to host
    sites = {
      "example.com" = {
        gitRepo = "http://localhost:3000/user/site";
        wwwRedirect = true;
      };
      "blog.example.com" = {
        gitRepo = "http://localhost:3000/user/blog";
        wwwRedirect = false;
      };
    };
  };
}

Options

  • enable - Enable the chobble-server configuration
  • baseDomain - Base domain for services (git will be hosted at git.basedomain)
  • ntfyAddress - ntfy.sh address for service failure notifications
  • myAddress - Your IP address (SSH access will be restricted to this IP)
  • sites - Attrset of static sites to host
  • gitRepo - Git repository URL
  • wwwRedirect - Whether to redirect www subdomain
  • useHTTPS - Whether to use HTTPS (default: true)
  • host - Hosting service to use ("caddy" or "neocities", default: "caddy")
  • apiKey - API key for the hosting service (if required)