modules/argos: init argos-translate module
This commit is contained in:
parent
9ed408cc86
commit
9f6bedbdc8
3 changed files with 21 additions and 4 deletions
18
modules/home-manager/programs/argos-translate.nix
Normal file
18
modules/home-manager/programs/argos-translate.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
./aerc.nix
|
||||
./argos-translate.nix
|
||||
./communication.nix
|
||||
./dev-tools.nix
|
||||
./flameshot.nix
|
||||
|
|
|
@ -120,6 +120,8 @@
|
|||
|
||||
local.programs.flameshot.enable = lib.mkDefault true;
|
||||
|
||||
local.programs.argos-translate.enable = lib.mkDefault true;
|
||||
|
||||
################################################################################
|
||||
# Services
|
||||
################################################################################
|
||||
|
@ -156,10 +158,6 @@
|
|||
procs
|
||||
bottom
|
||||
jq
|
||||
|
||||
# Translator
|
||||
# use argospm tool to manage libraries
|
||||
python311Packages.argostranslate
|
||||
];
|
||||
|
||||
home.file = {
|
||||
|
|
Loading…
Reference in a new issue