make keyPath optional

This commit is contained in:
Aaron Bieber 2023-09-25 12:44:14 -06:00
parent c14c980810
commit f0e210abc6
No known key found for this signature in database

View File

@ -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
'';
};
};
};