Commit 3ced120

HPCesia <me@hpcesia.com>
2026-03-20 07:39:20
refactor: den aspect - services/mihomo
den
1 parent 882d90c
modules/hosts/kevin/services/default.nix
@@ -2,6 +2,8 @@
   inherit (den.lib) __findFile;
 in {
   den.aspects.kevin.includes = [
+    <services/mihomo>
+
     <services/podman>
   ];
 }
modules/hosts/kevin/default.nix
@@ -51,13 +51,6 @@ in {
         desktop
         dev
       ])
-      ++ (
-        map
-        (n: config.flake.modules.nixos."${config.flake.meta.service.prefix}${n}")
-        [
-          "mihomo"
-        ]
-      )
       ++ [
         {
           home-manager.users.hpcesia = {
modules/services/mihomo/config/core.nix
@@ -1,5 +1,5 @@
 {
-  flake.modules.nixos."services/mihomo" = _: {
+  den.aspects.services.provides.mihomo.nixos = {
     services.mihomo.config = {
       mixed-port = 7154;
       allow-lan = true;
modules/services/mihomo/config/dns.nix
@@ -1,5 +1,5 @@
 {
-  flake.modules.nixos."services/mihomo" = _: {
+  den.aspects.services.provides.mihomo.nixos = {
     services.mihomo.config.dns = {
       enable = true;
       prefer-h3 = true;
modules/services/mihomo/config/proxy-groups.nix
@@ -1,5 +1,5 @@
 {
-  flake.modules.nixos."services/mihomo" = _: let
+  den.aspects.services.provides.mihomo.nixos = let
     FilterHK = "^(?=.*((?i)🇭🇰|香港|\\b(HK|Hong)(\\d+)?\\b))(?!.*((?i)回国|校园|网站|地址|剩余|过期|时间|有效|网址|禁止|邮箱|发布|客服|订阅|节点)).*$";
     FilterTW = "^(?=.*((?i)🇹🇼|台湾|\\b(TW|Tai|Taiwan)(\\d+)?\\b))(?!.*((?i)回国|校园|网站|地址|剩余|过期|时间|有效|网址|禁止|邮箱|发布|客服|订阅|节点)).*$";
     FilterJP = "^(?=.*((?i)🇯🇵|日本|川日|东京|大阪|泉日|埼玉|\\b(JP|Japan)(\\d+)?\\b))(?!.*((?i)回国|校园|网站|地址|剩余|过期|时间|有效|网址|禁止|邮箱|发布|客服|订阅|节点)).*$";
modules/services/mihomo/config/proxy-providers.nix
@@ -1,5 +1,5 @@
 {lib, ...}: {
-  flake.modules.nixos."services/mihomo" = {config, ...}: let
+  den.aspects.services.provides.mihomo.nixos = {config, ...}: let
     NodeParam = {
       type = "http";
       interval = 86400;
modules/services/mihomo/config/rules.nix
@@ -1,5 +1,5 @@
 {lib, ...}: {
-  flake.modules.nixos."services/mihomo" = {config, ...}: let
+  den.aspects.services.provides.mihomo.nixos = {config, ...}: let
     RuleSet_classical = {
       type = "http";
       behavior = "classical";
modules/services/mihomo/config/sniffer.nix
@@ -1,5 +1,5 @@
 {
-  flake.modules.nixos."services/mihomo" = _: {
+  den.aspects.services.provides.mihomo.nixos = {
     services.mihomo.config.sniffer = {
       enable = true;
       sniff = {
modules/services/mihomo/config/tun.nix
@@ -1,5 +1,5 @@
 {
-  flake.modules.nixos."services/mihomo" = _: {
+  den.aspects.services.provides.mihomo.nixos = {
     services.mihomo.tunMode = true;
 
     services.mihomo.config.tun = {
modules/services/mihomo/default.nix
@@ -1,8 +1,7 @@
 {
-  flake.modules.nixos."services/mihomo" = {pkgs, ...}: {
+  den.aspects.services.provides.mihomo.nixos = {
     services.mihomo = {
       enable = true;
-      # webui = pkgs.metacubexd;
     };
   };
 }
modules/services/mihomo/options.nix
@@ -1,5 +1,5 @@
 {lib, ...}: {
-  flake.modules.nixos."services/mihomo" = {
+  den.aspects.services.provides.mihomo.nixos = {
     config,
     pkgs,
     ...