18 lines
559 B
Nix
18 lines
559 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.local.programs.argos-translate; in
|
|
{
|
|
options.local.programs.argos-translate = with lib; {
|
|
enable = mkEnableOption "argostranslate";
|
|
package = mkPackageOption pkgs.python311Packages "argostranslate" {};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home.packages = [ cfg.package ];
|
|
|
|
programs.zsh.shellAliases = lib.mkIf config.programs.zsh.enable {
|
|
en2ru = "${cfg.package}/bin/argos-translate --from en --to ru";
|
|
ru2en = "${cfg.package}/bin/argos-translate --from ru --to en";
|
|
};
|
|
};
|
|
}
|