104 lines
2.6 KiB
Nix
104 lines
2.6 KiB
Nix
{
|
|
inputs,
|
|
config,
|
|
...
|
|
}: let
|
|
flk = config.flake;
|
|
in {
|
|
flake.modules.nixos.server = {
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: {
|
|
nixpkgs.overlays = [inputs.nix-openclaw.overlays.default];
|
|
|
|
sops.secrets."openclaw/telegram_token" = {
|
|
owner = flk.meta.user.name;
|
|
};
|
|
sops.secrets."openclaw/env" = {
|
|
owner = flk.meta.user.name;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
google-chrome
|
|
whisper-cpp
|
|
libqalculate
|
|
yt-dlp
|
|
gh
|
|
poppler-utils
|
|
pandoc
|
|
];
|
|
};
|
|
|
|
flake.modules.homeManager.server = {pkgs, ...}: {
|
|
imports = [inputs.nix-openclaw.homeManagerModules.openclaw];
|
|
|
|
programs.openclaw = {
|
|
enable = true;
|
|
config = {
|
|
channels.telegram = {
|
|
tokenFile = "/run/secrets/openclaw/telegram_token";
|
|
allowFrom = [
|
|
flk.meta.telegram.userId
|
|
];
|
|
};
|
|
|
|
browser = {
|
|
"enabled" = true;
|
|
"remoteCdpTimeoutMs" = 1500;
|
|
"remoteCdpHandshakeTimeoutMs" = 3000;
|
|
"color" = "#FF4500";
|
|
"executablePath" = "${pkgs.google-chrome}/bin/google-chrome-stable";
|
|
"headless" = true;
|
|
"noSandbox" = true;
|
|
"attachOnly" = false;
|
|
"defaultProfile" = "chrome";
|
|
"ssrfPolicy" = {};
|
|
"profiles" = {
|
|
"openclaw" = {
|
|
"cdpPort" = 18800;
|
|
"color" = "#FF4500";
|
|
};
|
|
};
|
|
};
|
|
|
|
agents.defaults = {
|
|
"model" = {
|
|
"primary" = "anthropic/claude-sonnet-4-6";
|
|
"fallbacks" = [];
|
|
};
|
|
"models" = {
|
|
"anthropic/claude-sonnet-4-6" = {
|
|
"alias" = "sonnet";
|
|
};
|
|
};
|
|
"compaction" = {
|
|
"mode" = "safeguard";
|
|
};
|
|
};
|
|
|
|
gateway = {
|
|
mode = "local";
|
|
};
|
|
};
|
|
bundledPlugins = {
|
|
summarize.enable = true; # Summarize web pages, PDFs, videos
|
|
sag.enable = true; # Text-to-speech
|
|
gogcli.enable = true;
|
|
goplaces.enable = true; # Google Places API
|
|
};
|
|
};
|
|
|
|
systemd.user.services.openclaw-gateway = {
|
|
Unit = {
|
|
After = ["network-online.target"];
|
|
Wants = ["network-online.target"];
|
|
};
|
|
Service = {
|
|
Environment = [
|
|
"PATH=/run/wrappers/bin:/home/teesh/.nix-profile/bin:/nix/profile/bin:/home/teesh/.local/state/nix/profile/bin:/etc/profiles/per-user/teesh/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/teesh/.local/bin:/home/teesh/bin:/usr/local/bin:/usr/bin:/bin"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|