chore: resonite, storage and forgejo setup

This commit is contained in:
Luna Simons 2026-02-27 21:47:24 +01:00
parent d79fe97b7e
commit 279e95a1ec
No known key found for this signature in database
GPG key ID: FAB9C1BCA0FED262
18 changed files with 203 additions and 167 deletions

View file

@ -8,7 +8,7 @@ let
cfg = config.services.resonite-server;
settingsFormat = pkgs.formats.json { };
settingsFile = settingsFormat.generate "config.json" cfg.settings;
generatedSettingsFile = settingsFormat.generate "config.json" cfg.settings;
in
{
options.services.resonite-server = {
@ -24,6 +24,15 @@ in
'';
};
settingsFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
The configuration to run on startup. This overrides `settings`.
Read <https://wiki.resonite.com/Headless_server_software/Configuration_file> for details.
'';
};
environment = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = { };
@ -65,11 +74,15 @@ in
user = "0";
volumes = [
"${settingsFile}:/Config/config.json:ro"
"resonite-server-logs:/Logs"
"resonite-server-mods:/RML"
];
volumes =
let
configFile = if cfg.settingsFile != null then cfg.settingsFile else generatedSettingsFile;
in
[
"${configFile}:/Config/config.json:ro"
"resonite-server-logs:/Logs"
"resonite-server-mods:/RML"
];
};
};
};