Closed ghost closed 1 year ago
If the parent directory doesn't exist ln will fail, so i mkdir -p the parent. My usecase was
ln
mkdir -p
{ services.minecraft-servers = { enable = true; eula = true; servers = { "test" = { enable = true; openFirewall = true; package = mcPkgs.paperServers.paper-1_19_3; symlinks = { mods = pkgs.linkFarmFromDrvs "mods" (map mcPkgs.fetchModrinthMod (builtins.attrValues { UnifiedMetrics = { id = "YREl7q0o"; hash = "sha256-3/MjbjBI+FkDOiTeHftZuARGIrgexXdAPsrcTfLFih8="; }; })); "config/unifiedmetrics/config.yml" = pkgs.writeText "unifiedmetrics-config.yml" (builtins.toJSON { server.name = "global"; metrics = { enabled = true; driver = "prometheus"; collectors = { systemGc = true; systemMemory = true; systemProcess = true; systemThread = true; server = true; world = true; tick = true; events = true; }; }; }); }; }; }; }; }
failing because config/unifiedmetrics didnt get created
config/unifiedmetrics
If the parent directory doesn't exist
ln
will fail, so imkdir -p
the parent. My usecase wasfailing because
config/unifiedmetrics
didnt get created