mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
a88df2fb10
Bacon is a background rust code checker. See <https://dystroy.org/bacon/>.
37 lines
839 B
Nix
37 lines
839 B
Nix
{ 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";
|
|
|
|
settings = mkOption {
|
|
type = settingsFormat.type;
|
|
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 {
|
|
home.packages = [ pkgs.bacon ];
|
|
|
|
xdg.configFile."bacon/prefs.toml".source =
|
|
settingsFormat.generate "prefs.toml" cfg.settings;
|
|
};
|
|
}
|