nixos: services: add homebox
This commit is contained in:
parent
1540483955
commit
533e3b9a9f
2 changed files with 43 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
./forgejo
|
||||
./gitea
|
||||
./grocy
|
||||
./homebox
|
||||
./indexers
|
||||
./jellyfin
|
||||
./komga
|
||||
|
|
|
|||
42
modules/nixos/services/homebox/default.nix
Normal file
42
modules/nixos/services/homebox/default.nix
Normal 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
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue