File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 11
11
filterAttrs
12
12
flatten
13
13
flip
14
+ forEach
15
+ head
14
16
imap0
15
17
listToAttrs
16
18
mapAttrs
23
25
optionalString
24
26
optionalAttrs
25
27
replaceStrings
28
+ removePrefix
29
+ splitString
30
+ tail
26
31
;
27
32
in {
28
33
options . topology . extractors . services . enable = mkEnableOption "topology service extractor" // { default = true ; } ;
63
68
config . services . blocky . settings . ports ) ;
64
69
} ;
65
70
71
+ dnsmasq = mkIf config . services . dnsmasq . enable {
72
+ name = "Dnsmasq" ;
73
+ icon = "services.dnsmasq" ;
74
+ details = let
75
+ addresses = config . services . dnsmasq . settings . address ;
76
+ in
77
+ listToAttrs ( forEach
78
+ ( forEach addresses
79
+ ( x : ( splitString "/" ( removePrefix "/" x ) ) ) )
80
+ ( x : {
81
+ name = head x ;
82
+ value . text = head ( tail x ) ;
83
+ } ) ) ;
84
+ } ;
85
+
66
86
esphome = mkIf config . services . esphome . enable {
67
87
name = "ESPHome" ;
68
88
icon = "services.esphome" ;
You can’t perform that action at this time.
0 commit comments