Add readeck service.
This commit is contained in:
parent
39626b43ee
commit
c231e5349e
6 changed files with 68 additions and 3 deletions
49
common/services/readeck.nix
Normal file
49
common/services/readeck.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue