commit fec05024a75fb83d4f34015e0115fb262d6e8d3f parent fb0381812393f391ec992f146ca433091416746a Author: Luke Willis <lukejw@monastech.xyz> Date: Wed, 6 May 2026 12:36:05 -0400 services: Fix mod support in minecraft-service-type Diffstat:
| M | mt/services/games.scm | | | 12 | +++++------- |
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/mt/services/games.scm b/mt/services/games.scm @@ -89,7 +89,7 @@ (let ((user (getpwnam "minecraft")) (eula #$(string-append home "/eula.txt")) - (mod-dir #$(string-append home "/mods"))) + (mod-dir #$(string-append home "/mods/"))) ;; TODO: Setup files as the root user ;; Setup files as the git user. (match (primitive-fork) @@ -108,14 +108,12 @@ ;; TODO: server.properties ;; Symlink mods to the mods folder. - (if (not (file-exists? mod-dir)) - (mkdir mod-dir)) + (if (file-exists? mod-dir) + (delete-file-recursively mod-dir)) + (mkdir mod-dir) (for-each (lambda (mod) - (let ((out-mod (string-append mod-dir (basename mod)))) - (if (file-exists? out-mod) - (delete-file out-mod)) - (symlink mod out-mod))) + (symlink mod (string-append mod-dir (basename mod)))) (list #$@mods)) ;; Return to main thread.