From be4317cf9d982018b4ff86375d680826ffacb62f Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Thu, 28 Dec 2023 22:20:03 +0100 Subject: refactor!: package using Nix Signed-off-by: Sefa Eyeoglu --- README.md | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 352fe34b4b..02b43e60f4 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,37 @@ # Prism Launcher Meta + Scripts to generate jsons and jars that Prism Launcher will access. -## Deployment -It is recommended to use Docker to deploy the environment. - -- Clone this repo to a server -- Make sure it's writable by the container later: `chown -R 1337:1337 .` -- Configure `config/config_local.sh` - - The defaults should be fine (apart from committer email and name perhaps) -- Put your SSH key (which has push access to meta-upstream and meta-launcher) at `config/deploy.key` -- Pull meta- repos: `bash clone.sh` -- Customize docker-compose.yaml -- Run `docker-compose up -d --build` -- Observe Cron logs using `docker-compose logs -f` (Runs hourly by default) -- (Optional) Run once to fill caches: `docker-compose run meta update` - -For local development you can also use `docker-compose.local.yaml`. By default, it uses `UID=1000` and `GID=1000`. -Make sure it's the same as your host instance. +## Recommended Deployment + +Assuming you have a Flake-based NixOS configuration + +- Add Flake input: + + ```nix + { + inputs.prism-meta.url = "github:PrismLauncher/meta"; + } + ``` + +- Import NixOS module and configure + + ```nix + {inputs, ...}: { + imports = [inputs.prism-meta.nixosModules.default]; + services.blockgame-meta = { + enable = true; + settings = { + DEPLOY_TO_GIT = "true"; + GIT_AUTHOR_NAME = "Herpington Derpson"; + GIT_AUTHOR_EMAIL = "herpderp@derpmail.com"; + GIT_COMMITTER_NAME = "Herpington Derpson"; + GIT_COMMITTER_EMAIL = "herpderp@derpmail.com"; + }; + }; + } + ``` + +- Rebuild and activate! +- Trigger it `systemctl start blockgame-meta.service` +- Monitor it `journalctl -fu blockgame-meta.service` -- cgit 0.0.5-2-1-g0f52