just: deprecate module
The module is no longer necessary since completions work out of the box now.
This commit is contained in:
parent
71fa4cdf9c
commit
eb3598cf44
|
@ -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
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue