make keyPath optional
This commit is contained in:
parent
c14c980810
commit
f0e210abc6
@ -30,7 +30,7 @@ in {
|
||||
};
|
||||
|
||||
keyPath = mkOption {
|
||||
type = types.path;
|
||||
type = with types; oneOf [path str];
|
||||
default = "";
|
||||
description = ''
|
||||
Path to the GitHub API key file
|
||||
@ -74,8 +74,9 @@ in {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/gostart -auth ${cfg.keyPath} -db ${cfg.dataDir}/gostart.db";
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/gostart ${lib.optionalString (cfg.keyPath != "") "-auth ${cfg.keyPath}"} -db ${cfg.dataDir}/gostart.db
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user