1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-20 01:59:45 +01:00

just: deprecate module

The module is no longer necessary since completions work out of the
box now.
This commit is contained in:
maximsmol 2022-12-02 20:48:58 -08:00 committed by Robert Helgesson
parent 71fa4cdf9c
commit eb3598cf44
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -9,44 +9,14 @@ let
in { in {
meta.maintainers = [ hm.maintainers.maximsmol ]; meta.maintainers = [ hm.maintainers.maximsmol ];
options.programs.just = { imports = let
enable = mkEnableOption msg = ''
"just, a handy way to save and run project-specific commands"; 'program.just' is deprecated, simply add 'pkgs.just' to 'home.packages' instead.
See https://github.com/nix-community/home-manager/issues/3449#issuecomment-1329823502'';
package = mkOption { in [
type = types.package; (mkRemovedOptionModule [ "programs" "just" "enable" ] msg)
default = pkgs.just; (mkRemovedOptionModule [ "programs" "just" "enableBashIntegration" ] msg)
defaultText = literalExpression "pkgs.just"; (mkRemovedOptionModule [ "programs" "just" "enableZshIntegration" ] msg)
description = "Package providing the <command>just</command> tool."; (mkRemovedOptionModule [ "programs" "just" "enableFishIntegration" ] msg)
}; ];
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
source ${cfg.package}/share/bash-completion/completions/just.bash
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
source ${cfg.package}/share/zsh/site-functions/_just
'';
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
source ${cfg.package}/share/fish/vendor_completions.d/just.fish
'';
};
} }