Add readeck service.

This commit is contained in:
Lorenzo Good 2025-12-14 18:01:30 -05:00
parent 39626b43ee
commit c231e5349e
Signed by: lorenzo
GPG key ID: 7FCD64BD81180ED0
6 changed files with 68 additions and 3 deletions

View file

@ -0,0 +1,49 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) types mkEnableOption mkIf mkOption;
cfg = config.foehammer.services.readeck;
in {
options.foehammer.services.readeck = {
enable = mkEnableOption "Enable readeck server";
port = mkOption {
type = lib.types.port;
default = 8224;
description = ''
What external port to serve over.
'';
};
envFile = mkOption {
type = types.nullOr types.path;
};
domain = mkOption {
type = types.str;
description = ''
Readeck's domain.
'';
};
};
config = mkIf cfg.enable {
services.readeck = {
enable = true;
environmentFile = cfg.envFile;
settings = {
server = {
port = cfg.port;
base_url = cfg.domain;
};
extractor = {
workers = 2;
};
};
};
};
}