Commit d1e462f

HPCesia <me@hpcesia.com>
2026-10-21 12:33:18
host: add location to schema
1 parent 47fe5c5
Changed files (4)
modules
hosts
services
modules/hosts/cyrene/default.nix
@@ -6,6 +6,7 @@
       Based on a KVM virtual host,
       with 2 virtual core CPU, 2GB RAM and 60GB SSD storage.
     '';
+    location = "DE";
 
     users.hpcesia = {
       admin = true;
modules/hosts/hyacine/default.nix
@@ -6,6 +6,7 @@
       Based on a KVM virtual host,
       with AMD EPYC 7K62 2 core @ 2.6GHz, 2GB RAM and 30GB SSD storage.
     '';
+    location = "HK";
 
     users.hpcesia = {
       admin = true;
modules/hosts/schema.nix
@@ -30,6 +30,11 @@
         ipv4 = ipvXOptions 4;
         ipv6 = ipvXOptions 6;
       };
+      location = lib.mkOption {
+        description = "In which region the host located.";
+        type = lib.types.str;
+        default = "CN";
+      };
     };
   };
 }
modules/services/mihomo/proxies.nix
@@ -34,7 +34,7 @@
           };
           proxies = [
             {
-              name = "[Self]HK-Hyacine";
+              name = "[Self]${hyacine.location}-Hyacine";
               type = "vless";
               server._secret = config.vaultix.secrets.${hyacine.address.ipv4.secret.name}.path;
               port = 443;