feat(nvim): add gen.nvim and ollama service

This commit is contained in:
Moritz Böhme 2023-12-10 17:15:00 +01:00
parent ddc2989620
commit 82ffbcbde4
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
6 changed files with 74 additions and 1 deletions

View file

@ -0,0 +1,27 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.my.services.ollama;
in
{
options.my.services.ollama = {
enable = mkEnableOption "ollama";
package = mkOption {
type = types.package;
default = pkgs.ollama;
};
};
config = mkIf cfg.enable {
systemd.user.services.ollama = {
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
Restart = "on-failure";
RestartSec = "1s";
ExecStart = "${getExe cfg.package} serve";
};
};
};
}