more opencode stuff

This commit is contained in:
Anish Lakhwara
2026-01-13 20:34:35 -08:00
parent 328779b0ac
commit 3b33575b2a
11 changed files with 235 additions and 106 deletions
+5
View File
@@ -23,6 +23,11 @@
settings.PermitRootLogin = "no";
};
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-rofi;
};
hardware.keyboard.qmk.enable = true;
services.udev.packages = with pkgs; [ via ];
+22 -28
View File
@@ -1,8 +1,8 @@
{ pkgs, config, lib, ... }:
{
# ===================
# Ollama Service
# ===================
virtualisation.docker.enable = true;
users.users.anish.extraGroups = [ "docker" ];
services.ollama = {
enable = true;
acceleration = null; # CPU only, no GPU
@@ -10,9 +10,6 @@
port = 11434;
};
# ===================
# PostgreSQL: Letta Database
# ===================
services.postgresql = {
enable = true;
ensureDatabases = [ "letta" ];
@@ -35,27 +32,24 @@
# pgvector is already provided by immich profile via services.immich.database.enableVectorChord
};
# ===================
# Database Setup Service
# ===================
# Runs after postgresql to enable pgvector and set password
systemd.services.raven-db-setup = {
description = "Setup Letta database with pgvector and password";
after = [ "postgresql.service" ];
wantedBy = [ "multi-user.target" ];
path = [ config.services.postgresql.package ];
serviceConfig = {
Type = "oneshot";
User = "postgres";
RemainAfterExit = true;
};
script = ''
# Enable pgvector extension
psql -d letta -c "CREATE EXTENSION IF NOT EXISTS vector;"
#systemd.services.raven-db-setup = {
# description = "Setup Letta database with pgvector and password";
# after = [ "postgresql.service" ];
# wantedBy = [ "multi-user.target" ];
# Add your user to docker group
# path = [ config.services.postgresql.package ];
# serviceConfig = {
# Type = "oneshot";
# User = "postgres";
# RemainAfterExit = true;
# };
# script = ''
# # Enable pgvector extension
# psql -d letta -c "CREATE EXTENSION IF NOT EXISTS vector;"
# Set password for letta user
# TODO: Consider using agenix for production
psql -c "ALTER USER letta WITH PASSWORD 'letta-dev-password';"
'';
};
# # Set password for letta user
# # TODO: Consider using agenix for production
# psql -c "ALTER USER letta WITH PASSWORD 'letta-dev-password';"
# '';
#;
}