From 0f80da3bde07fcd19daefbb88f1a66fbdf90258a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 7 Dec 2024 15:53:47 +0100 Subject: feat(modules/ollama): Init --- flake/nixosConfigurations/common.nix | 1 + modules/by-name/ol/ollama/module.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 modules/by-name/ol/ollama/module.nix diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index de1bd03c..f4530a12 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -50,6 +50,7 @@ beetsPkg = config.home-manager.users.soispha.programs.beets.package; }; }; + ollama.enable = true; postgresql.enable = false; printing.enable = true; scanning.enable = true; diff --git a/modules/by-name/ol/ollama/module.nix b/modules/by-name/ol/ollama/module.nix new file mode 100644 index 00000000..418a1851 --- /dev/null +++ b/modules/by-name/ol/ollama/module.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.services.ollama; +in { + options.soispha.services.ollama = { + enable = lib.mkEnableOption "ollama"; + }; + + config = lib.mkIf cfg.enable { + soispha.impermanence.directories = [ + config.services.ollama.home + ]; + + services.ollama = { + enable = true; + # acceleration = "rocm"; + }; + }; +} -- cgit 1.4.1