Skip to content

Commit

Permalink
move ai stuffs into its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanwang-wf committed Nov 1, 2023
1 parent 8577b0f commit 0615364
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions hosts/wk01174.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# enable = true;
# supportLocalVirtualBuilder = true;
# };
ai.enable = true;
secrets.agenix = { enable = true; };
brew = {
enable = true;
Expand Down
22 changes: 20 additions & 2 deletions modules/ai.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
{ ... }:
{ config, lib, pkgs, ... }:

{ }
with lib;
let
cfg = config.modules.ai;
in
{
options.modules.ai = { enable = mkEnableOption "ai"; };

config = mkIf cfg.enable {
home-manager.users.${config.my.username} = {
home.packages = [
(pkgs.python3.withPackages (ps:
with ps; [
huggingface-hub
]))
ollama
];
};
};
}
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
flake.nixosModules = {
common.imports = [
./agenix.nix
./ai.nix
./common.nix
./browsers/firefox.nix
./dev/agda.nix
Expand Down
1 change: 0 additions & 1 deletion modules/dev/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ in {
# pylsp-mypy
virtualenv
virtualenvwrapper
huggingface-hub
litellm
tokenizers
]))
Expand Down
1 change: 0 additions & 1 deletion modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ with pkgs; [
just
pkg-config
racket
ollama
# open-interpreter
# reiryoku-firmware
# reiryoku-flash
Expand Down

0 comments on commit 0615364

Please sign in to comment.