modue stuff
This commit is contained in:
parent
1f8cd90ee4
commit
48c4ac4f59
1 changed files with 40 additions and 31 deletions
19
flake.nix
19
flake.nix
|
|
@ -15,6 +15,7 @@
|
|||
home-manager,
|
||||
...
|
||||
}@inputs:
|
||||
(
|
||||
let
|
||||
inherit (lib) mkEnableOption mkPackageOption mkIf;
|
||||
lib = nixpkgs.lib;
|
||||
|
|
@ -45,7 +46,9 @@
|
|||
gotools
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
)
|
||||
// {
|
||||
homeManagerModules.default =
|
||||
{
|
||||
config,
|
||||
|
|
@ -95,19 +98,25 @@
|
|||
tomlFormat = pkgs.formats.toml { };
|
||||
configFile = tomlFormat.generate "llm-shell-hint-config" cfg.settings;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
lib.mkIf cfg.enable {
|
||||
home.packages = [ self.packages."${system}".llm-shell-hint ];
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
${lib.getExe self.packages."${system}".llm-shell-hint} init bash --config-file "${configFile}" | source
|
||||
${
|
||||
lib.getExe self.packages."${system}".llm-shell-hint
|
||||
} init bash --config-file "${configFile}" | source
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
${lib.getExe self.packages."${system}".llm-shell-hint} init zsh --config-file "${configFile}" | source
|
||||
${
|
||||
lib.getExe self.packages."${system}".llm-shell-hint
|
||||
} init zsh --config-file "${configFile}" | source
|
||||
'';
|
||||
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
${lib.getExe self.packages."${system}".llm-shell-hint} init fish --config-file "${configFile}" | source
|
||||
${
|
||||
lib.getExe self.packages."${system}".llm-shell-hint
|
||||
} init fish --config-file "${configFile}" | source
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue