2020-10-01 15:46:04 -07:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.services.calibre;
|
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.services.calibre = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
2020-03-28 22:48:43 -07:00
|
|
|
services.calibre-server.enable = true;
|
2020-10-01 15:46:04 -07:00
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
networking.firewall.allowedTCPPorts = [ 8080 ];
|
|
|
|
};
|
|
|
|
}
|