mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-07 20:47:14 +03:00
br v4
This commit is contained in:
+10
-23
@@ -5,8 +5,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/homebox";
|
||||
targetDir = "/var/lib/homebox";
|
||||
storage = xlib.helpers.mkServiceStorage {
|
||||
name = "homebox";
|
||||
user = "homebox";
|
||||
group = "homebox";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.homebox = {
|
||||
@@ -14,33 +17,17 @@ in
|
||||
settings = {
|
||||
HBOX_WEB_HOST = "0.0.0.0";
|
||||
HBOX_WEB_PORT = "7745";
|
||||
HBOX_STORAGE_CONN_STRING = "file://${targetDir}";
|
||||
HBOX_STORAGE_CONN_STRING = "file://${storage.target}";
|
||||
HBOX_STORAGE_PREFIX_PATH = "data";
|
||||
HBOX_DATABASE_DRIVER = "sqlite3";
|
||||
HBOX_DATABASE_SQLITE_PATH = "${targetDir}/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1";
|
||||
HBOX_DATABASE_SQLITE_PATH = "${storage.target}/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1";
|
||||
HBOX_OPTIONS_ALLOW_REGISTRATION = "true";
|
||||
HBOX_OPTIONS_GITHUB_RELEASE_CHECK = "false";
|
||||
HBOX_MODE = "production";
|
||||
HOME = "${targetDir}";
|
||||
TMPDIR = "${targetDir}/tmp";
|
||||
HOME = "${storage.target}";
|
||||
TMPDIR = "${storage.target}/tmp";
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0755 homebox homebox -"
|
||||
"z ${sourceDir} 0755 homebox homebox -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
systemd = storage.systemd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user