nixos: services: add homebox

This commit is contained in:
Bruno BELANYI 2025-01-29 19:14:54 +01:00
parent 1540483955
commit 533e3b9a9f
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,42 @@
# Home inventory made easy
{ config, lib, ... }:
let
cfg = config.my.services.homebox;
in
{
options.my.services.homebox = with lib; {
enable = mkEnableOption "Homebox home inventory";
port = mkOption {
type = types.port;
default = 7745;
example = 8080;
description = "Internal port for webui";
};
};
config = lib.mkIf cfg.enable {
services.homebox = {
enable = true;
settings = {
# FIXME: mailer?
HBOX_WEB_PORT = toString cfg.port;
};
};
my.services.nginx.virtualHosts = {
homebox = {
inherit (cfg) port;
};
};
my.services.backup = {
paths = [
config.services.homebox.settings.HBOX_STORAGE_DATA
];
};
# NOTE: unfortunately homebox does not log connection failures for fail2ban
};
}