bacon: add package option

Allows overriding the package with a different version. Useful if you
need a different version and don't want (or can't) use an overlay.
This commit is contained in:
Jalil David Salamé Messina 2024-04-02 17:17:37 +02:00
parent 4be0464472
commit 6396954c0d
No known key found for this signature in database
GPG Key ID: F016B9E770737A0B
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,8 @@ in {
options.programs.bacon = {
enable = mkEnableOption "bacon, a background rust code checker";
package = mkPackageOption pkgs "bacon" { };
settings = mkOption {
type = settingsFormat.type;
example = {
@ -29,7 +31,7 @@ in {
};
config = mkIf cfg.enable {
home.packages = [ pkgs.bacon ];
home.packages = [ cfg.package ];
xdg.configFile."bacon/prefs.toml".source =
settingsFormat.generate "prefs.toml" cfg.settings;