mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add homebox
This commit is contained in:
parent
40eb62a6bd
commit
411024cd3c
6 changed files with 52 additions and 8 deletions
36
modules/nixos/server/homebox.nix
Normal file
36
modules/nixos/server/homebox.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ 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/data";
|
||||
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_STORAGE_DATA = cfg.location;
|
||||
HBOX_STORAGE_SQLITE_URL =
|
||||
"${cfg.location}/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1";
|
||||
HBOX_OPTIONS_ALLOW_REGISTRATION = "true";
|
||||
HBOX_MODE = "production";
|
||||
};
|
||||
|
||||
};
|
||||
systemd.services.homebox.serviceConfig.WorkingDirectory =
|
||||
mkForce cfg.location;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue