Commit 082ea4e

HPCesia <me@hpcesia.com>
2026-06-12 09:36:53
update sub-store nixos module
1 parent bdb9646
Changed files (2)
nixos-modules/default.nix
@@ -1,5 +1,5 @@
 {
-  # Add your NixOS modules here
-  #
   mihomo = ./mihomo.nix;
+
+  sub-store = ./sub-store.nix;
 }
nixos-modules/sub-store.nix
@@ -71,10 +71,18 @@ in {
         }
         // (lib.optionalAttrs (cfg.frontend.enable) {
           SUB_STORE_FRONTEND_PATH = "${cfg.frontend.package}";
-          SUB_STORE_FRONTEND_PORT = toString cfg.frontend.port;
           SUB_STORE_FRONTEND_HOST = cfg.frontend.address;
           SUB_STORE_FRONTEND_BACKEND_PATH = cfg.frontend.backendPath;
         })
+        // (
+          if (cfg.port == cfg.frontend.port)
+          then {
+            SUB_STORE_BACKEND_MERGE = true;
+          }
+          else {
+            SUB_STORE_FRONTEND_PORT = toString cfg.frontend.port;
+          }
+        )
         // cfg.environment.extra;
 
       serviceConfig =