2023-08-20 10:38:49 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.bacon;
|
|
|
|
|
|
|
|
settingsFormat = pkgs.formats.toml { };
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ hm.maintainers.shimunn ];
|
|
|
|
|
|
|
|
options.programs.bacon = {
|
|
|
|
enable = mkEnableOption "bacon, a background rust code checker";
|
|
|
|
|
2024-04-02 17:17:37 +02:00
|
|
|
package = mkPackageOption pkgs "bacon" { };
|
|
|
|
|
2023-08-20 10:38:49 +02:00
|
|
|
settings = mkOption {
|
|
|
|
type = settingsFormat.type;
|
2024-04-02 17:20:03 +02:00
|
|
|
default = { };
|
2023-08-20 10:38:49 +02:00
|
|
|
example = {
|
|
|
|
jobs.default = {
|
|
|
|
command = [ "cargo" "build" "--all-features" "--color" "always" ];
|
|
|
|
need_stdout = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
description = ''
|
|
|
|
Bacon configuration.
|
|
|
|
For available settings see <https://dystroy.org/bacon/#global-preferences>.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-04-02 17:17:37 +02:00
|
|
|
home.packages = [ cfg.package ];
|
2023-08-20 10:38:49 +02:00
|
|
|
|
|
|
|
xdg.configFile."bacon/prefs.toml".source =
|
|
|
|
settingsFormat.generate "prefs.toml" cfg.settings;
|
|
|
|
};
|
|
|
|
}
|