File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
nixos/modules/services/networking Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 2727 '' ;
2828
2929 sojuctl = pkgs . writeShellScriptBin "sojuctl" ''
30- exec ${ cfg . package } /bin/ sojuctl --config ${ configFile } "$@"
30+ exec ${ lib . getExe' cfg . package " sojuctl" } --config ${ cfg . configFile } "$@"
3131 '' ;
3232in
3333{
107107 extraConfig = mkOption {
108108 type = types . lines ;
109109 default = "" ;
110- description = "Lines added verbatim to the configuration file." ;
110+ description = "Lines added verbatim to the generated configuration file." ;
111+ } ;
112+
113+ configFile = mkOption {
114+ type = types . path ;
115+ default = configFile ;
116+ defaultText = "Config file generated from other options." ;
117+ description = ''
118+ Path to config file. If this option is set, it will override any
119+ configuration done using other options, including {option}`extraConfig`.
120+ '' ;
121+ example = literalExpression "./soju.conf" ;
111122 } ;
112123 } ;
113124
134145 serviceConfig = {
135146 DynamicUser = true ;
136147 Restart = "always" ;
137- ExecStart = "${ cfg . package } /bin/ soju -config ${ configFile } " ;
148+ ExecStart = "${ lib . getExe' cfg . package " soju" } -config ${ cfg . configFile } " ;
138149 StateDirectory = "soju" ;
139150 RuntimeDirectory = "soju" ;
140151 } ;
You can’t perform that action at this time.
0 commit comments