mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
30 lines
698 B
Nix
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";
|
|
};
|
|
};
|
|
};
|
|
}
|