flake/modules/nixos/server/homebox.nix
2025-01-14 12:33:22 +00:00

30 lines
698 B
Nix

{ pkgs, lib, config, ... }:
let
cfg = config.mods.server.homebox;
port = config.mods.server.nginx.ports.homebox;
in with lib; {
options.mods.server = {
homebox = {
enable = mkEnableOption {
default = false;
description = "enables homebox server";
};
location = mkOption {
default = "/srv/homebox";
description = "location for homebox data";
};
};
};
config = mkIf cfg.enable {
services.homebox = {
enable = true;
settings = {
HBOX_WEB_PORT = toString port;
HBOX_WEB_HOST = "0.0.0.0";
HBOX_OPTIONS_ALLOW_REGISTRATION = "true";
HBOX_MODE = "production";
};
};
};
}