server/slop: package brave-shim and run via user systemd service

This commit is contained in:
2026-02-24 19:12:25 +02:00
parent 872df78291
commit a271d6c3b5
3 changed files with 206 additions and 9 deletions

View File

@@ -1,5 +1,8 @@
{ pkgs, ... }:
let
braveShim = pkgs.callPackage ./brave-shim.nix { };
in
{
# Local Brave API shim as a user service
systemd.user.services.brave-shim = {
@@ -10,15 +13,7 @@
serviceConfig = {
Type = "simple";
WorkingDirectory = "/home/ocbwoy3/Projects/brave_shim";
ExecStart = ''
${pkgs.uv}/bin/uv run \
--with fastapi \
--with uvicorn \
--with ddgs \
--with pyyaml \
python brave_shim.py
'';
ExecStart = "${braveShim}/bin/brave-shim";
Restart = "always";
RestartSec = "3";
};