mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
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:
parent
906ba78d03
commit
c32a44f19f
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,8 @@ in {
|
||||||
options.programs.bacon = {
|
options.programs.bacon = {
|
||||||
enable = mkEnableOption "bacon, a background rust code checker";
|
enable = mkEnableOption "bacon, a background rust code checker";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "bacon" { };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = settingsFormat.type;
|
type = settingsFormat.type;
|
||||||
example = {
|
example = {
|
||||||
|
@ -29,7 +31,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.bacon ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."bacon/prefs.toml".source =
|
xdg.configFile."bacon/prefs.toml".source =
|
||||||
settingsFormat.generate "prefs.toml" cfg.settings;
|
settingsFormat.generate "prefs.toml" cfg.settings;
|
||||||
|
|
Loading…
Reference in a new issue