diff --git a/hosts/wk01174.nix b/hosts/wk01174.nix index b23e4776..e4d2f322 100644 --- a/hosts/wk01174.nix +++ b/hosts/wk01174.nix @@ -35,6 +35,7 @@ # enable = true; # supportLocalVirtualBuilder = true; # }; + ai.enable = true; secrets.agenix = { enable = true; }; brew = { enable = true; diff --git a/modules/ai.nix b/modules/ai.nix index 5bd3e36b..9c1d7ac4 100644 --- a/modules/ai.nix +++ b/modules/ai.nix @@ -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 + ]; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index a9f88639..c9ce7250 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -3,6 +3,7 @@ flake.nixosModules = { common.imports = [ ./agenix.nix + ./ai.nix ./common.nix ./browsers/firefox.nix ./dev/agda.nix diff --git a/modules/dev/python.nix b/modules/dev/python.nix index 244d28e1..4e124289 100644 --- a/modules/dev/python.nix +++ b/modules/dev/python.nix @@ -25,7 +25,6 @@ in { # pylsp-mypy virtualenv virtualenvwrapper - huggingface-hub litellm tokenizers ])) diff --git a/modules/packages.nix b/modules/packages.nix index bdd4fcfd..1c182a89 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -69,7 +69,6 @@ with pkgs; [ just pkg-config racket - ollama # open-interpreter # reiryoku-firmware # reiryoku-flash