mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 06:30:28 +00:00
e429a60900
Currently you need to specify the settings if you want to use bacon, but the empty settings works and is the default upstream: - <https://dystroy.org/bacon/config/> - [default `prefs.toml`][1] [1] https://raw.githubusercontent.com/Canop/bacon/main/defaults/default-prefs.toml
40 lines
910 B
Nix
40 lines
910 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";
|
|
|
|
package = mkPackageOption pkgs "bacon" { };
|
|
|
|
settings = mkOption {
|
|
type = settingsFormat.type;
|
|
default = { };
|
|
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 = [ cfg.package ];
|
|
|
|
xdg.configFile."bacon/prefs.toml".source =
|
|
settingsFormat.generate "prefs.toml" cfg.settings;
|
|
};
|
|
}
|