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 { keyPath = mkOption {
type = types.path; type = with types; oneOf [path str];
default = ""; default = "";
description = '' description = ''
Path to the GitHub API key file Path to the GitHub API key file
@ -74,8 +74,9 @@ in {
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
ExecStart = ExecStart = ''
"${cfg.package}/bin/gostart -auth ${cfg.keyPath} -db ${cfg.dataDir}/gostart.db"; ${cfg.package}/bin/gostart ${lib.optionalString (cfg.keyPath != "") "-auth ${cfg.keyPath}"} -db ${cfg.dataDir}/gostart.db
'';
}; };
}; };
}; };