26 lines
668 B
Nix
26 lines
668 B
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.my.servers.readeck;
|
|
setup = import ../factories/mkserver.nix { inherit lib config; };
|
|
in
|
|
{
|
|
options.my.servers.readeck = setup.mkOptions "readeck" "laters" 9546;
|
|
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
|
sops.secrets.readeck.sopsFile = ../../secrets/env.yaml;
|
|
services.readeck = {
|
|
inherit (cfg) enable;
|
|
environmentFile = config.sops.secrets.readeck.path;
|
|
settings = {
|
|
main = {
|
|
log_level = "warn";
|
|
data_directory = "/var/lib/readeck";
|
|
};
|
|
server = {
|
|
inherit (cfg) port;
|
|
host = cfg.ip;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|