Commit 2201297

HPCesia <me@hpcesia.com>
2026-06-12 03:42:32
don't use json output as yaml for mihomo config
1 parent c3db216
Changed files (1)
nixos-modules
nixos-modules/mihomo.nix
@@ -113,7 +113,10 @@ in {
           ];
 
           ExecStartPre = "+${pkgs.writeShellScript "mihomo-pre-start" ''
-            ${utils.genJqSecretsReplacementSnippet cfg.config "/run/mihomo/config.yaml"}
+            ${utils.genJqSecretsReplacementSnippet cfg.config "/run/mihomo/config.json"}
+            ${lib.getExe pkgs.yq-go} --input-format 'json' --output-format 'yaml' \
+                /run/mihomo/config.json > /run/mihomo/config.yaml
+            rm /run/mihomo/config.json
             chown --reference=/run/mihomo /run/mihomo/config.yaml
           ''}";