File tree Expand file tree Collapse file tree 1 file changed +56
-1
lines changed Expand file tree Collapse file tree 1 file changed +56
-1
lines changed Original file line number Diff line number Diff line change 1414    { 
1515      options . services . pyroscope   =  with  lib ;  { 
1616        enable   =  mkEnableOption   ( lib . mdDoc   "Grafana Agent (Flow mode)" ) ; 
17+         args   =  { 
18+           server   =  { 
19+             http-listen-port   =  mkOption   { 
20+               type   =  types . port ; 
21+               default   =  4040 ; 
22+               example   =  8080 ; 
23+             } ; 
24+             http-listen-address   =  mkOption   { 
25+               type   =  types . str ; 
26+               default   =  "127.0.0.1" ; 
27+               example   =  "0.0.0.0" ; 
28+             } ; 
29+ 
30+             grpc-listen-port   =  mkOption   { 
31+               type   =  types . port ; 
32+               default   =  9095 ; 
33+               example   =  9096 ; 
34+             } ; 
35+             grpc-listen-address   =  mkOption   { 
36+               type   =  types . str ; 
37+               default   =  "127.0.0.1" ; 
38+               example   =  "0.0.0.0" ; 
39+             } ; 
40+           } ; 
41+ 
42+           log   =  { 
43+             level   =  mkOption   { 
44+               type   =  types . enum   [ 
45+                 "debug" 
46+                 "info" 
47+                 "warn" 
48+                 "error" 
49+               ] ; 
50+               default   =  "info" ; 
51+               example   =  "debug" ; 
52+             } ; 
53+             format   =  mkOption   { 
54+               type   =  types . enum   [ 
55+                 "logfmt" 
56+                 "json" 
57+               ] ; 
58+               default   =  "logfmt" ; 
59+               example   =  "json" ; 
60+             } ; 
61+           } ; 
62+         } ; 
1763      } ; 
64+ 
1865      config   =  { 
1966        systemd . services . pyroscope   =  lib . mkIf   cfg . enable   { 
2067          description   =  "Pyroscope" ; 
2168          wantedBy   =  [  "multi-user.target"  ] ; 
2269          serviceConfig   =  { 
23-             ExecStart   =  ''${ lib . getExe   package } '' ; 
70+             ExecStart   =  '' 
71+               ${ lib . getExe   package }  \ 
72+               -server.http-listen-port ${ toString   cfg . args . server . http-listen-port }  \ 
73+               -server.http-listen-address ${ cfg . args . server . http-listen-address }  \ 
74+               -server.grpc-listen-port ${ toString   cfg . args . server . grpc-listen-port }  \ 
75+               -server.grpc-listen-address ${ cfg . args . server . grpc-listen-address }  \ 
76+               -log.level ${ cfg . args . log . level }  \ 
77+               -log.format ${ cfg . args . log . format }  
78+             '' ; 
2479          } ; 
2580        } ; 
2681      } ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments