chore: resonite, storage and forgejo setup
This commit is contained in:
parent
d79fe97b7e
commit
279e95a1ec
18 changed files with 203 additions and 167 deletions
|
|
@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue