{ config, pkgs, system, ghostty, ... }: # let # vesktopNoFuses = pkgs.vesktop.overrideAttrs (old: { # nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.jq ]; # postPatch = (old.postPatch or "") + '' # tmp="$(mktemp)" # jq 'del(.build.electronFuses)' package.json > "$tmp" # mv "$tmp" package.json # ''; # }); # in { imports = [ ./custom/hm ]; gtk = { enable = true; colorScheme = "dark"; theme = { name = "Adwaita-dark"; package = pkgs.gnome-themes-extra; }; iconTheme = { name = "Papirus-Dark"; package = pkgs.papirus-icon-theme; }; cursorTheme = { name = "macOS"; package = pkgs.apple-cursor; size = 28; }; }; home = { stateVersion = "25.11"; pointerCursor = { enable = true; gtk.enable = true; x11 = { enable = true; # defaultCursor = ""; }; dotIcons.enable = true; package = pkgs.apple-cursor; name = "macOS"; size = 26; }; shell = { enableFishIntegration = true; }; packages = with pkgs; [ vlc jq xfce4-taskmanager gparted tor-browser iperf sshuttle lmstudio dig libnotify arch-install-scripts ### gaming winetricks wine heroic vintagestory prismlauncher winboat # kdePackages.kdenlive (python313.withPackages ( py: with py; [ huggingface-hub haystack-ai raganything ] )) ] # anything-llm # ] ; ### NEVER USE THIS GARBAGE # flowblade pitivi koboldcpp sessionVariables = { DESKTOP = ":0"; OLLAMA_HOST = "10.20.0.201:11434"; }; }; xdg = { configFile."xfce4/helpers.rc".text = '' TerminalEmulator=ghostty ''; mimeApps = { enable = true; defaultApplications = { "text/html" = "firefox.desktop"; "x-scheme-handler/http" = "firefox.desktop"; "x-scheme-handler/https" = "firefox.desktop"; "x-scheme-handler/tg" = "org.telegram.desktop.desktop"; "x-scheme-handler/discord" = "vesktop.desktop"; "image/jpeg" = "swayimg.desktop"; "image/png" = "swayimg.desktop"; "image/webp" = "swayimg.desktop"; "application/zip" = "xarchiver.desktop"; }; }; configFile."obsidian/.keep".text = ""; }; systemd.user = { startServices = "sd-switch"; services = { prepare2watch = { Unit = { Description = "prepare videos to get later"; }; Service = { Type = "oneshot"; WorkingDirectory = "${config.home.homeDirectory}/Downloads/1/"; ExecStart = '' ${pkgs.coreutils-full}/bin/stdbuf -oL -eL ${pkgs.util-linux}/bin/flock -n %t/prepare2watch.lock ${pkgs.fish}/bin/fish ./prepare2watch.fish ''; }; }; }; paths = { prepare2watch = { Unit = { Description = "Watch ${config.home.homeDirectory}/Downloads/1/list"; }; Path = { PathChanged = "${config.home.homeDirectory}/Downloads/1/list"; PathModified = "${config.home.homeDirectory}/Downloads/1/list"; Unit = "prepare2watch.service"; }; Install = { WantedBy = [ "default.target" ]; }; }; }; }; services = { ollama = { # enable = true; # acceleration = vulkan; package = pkgs.ollama-vulkan; host = "10.20.0.201"; environmentVariables = { OLLAMA_MAX_LOADED_MODELS = "1"; OLLAMA_NUM_PARALLEL = "1"; OLLAMA_FLASH_ATTENTION = "1"; OLLAMA_KV_CACHE_TYPE = "q8_0"; # OLLAMA_CONTEXT_LENGTH = "16000"; OLLAMA_MODELS = "/home/thek0tyara/Downloads/llm/ollama"; }; }; podman = { enable = true; }; polkit-gnome.enable = true; qdrant = { enable = true; dataDir = "/mnt/HDD_A_DATA/services/lib/qdrant"; settings = { storage = { # storage_path = "/mnt/HDD_A_DATA/services/lib/qdrant/storage"; # snapshots_path = "/mnt/HDD_A_DATA/services/lib/qdrant/snapshots"; hnsw_index = { on_disk = true; }; }; service = { host = "127.0.0.1"; http_port = 6333; grpc_port = 6334; }; telemetry_disabled = true; }; }; }; programs = { ### custom n8n = { # enable = true; settings = { N8N_HOST = "127.0.0.1"; N8N_PORT = 5678; N8N_PROTOCOL = "http"; }; # environmentFile = ~/.config/n8n/secrets.env; # extraArgs = [ ]; }; llama-cpp = { enable = true; package = pkgs.llama-cpp.override { vulkanSupport = true; rpcSupport = true; }; defaultArgs = [ "--host" "127.0.0.1" "--port" "8080" "--jinja" "-fa" "on" ]; # eosStrings = [ "<|im_end|>" ]; presets = [ { name = "codegeex4"; path = "/home/thek0tyara/Downloads/llm/codegeex4-all-9b.Q8_0.gguf"; eosStrings = [ "<|im_end|>" ]; } ]; }; opencode = { enable = true; settings = { compaction = { auto = true; prune = true; }; watcher = { ignore = [ ".git/**" ]; }; plugin = [ "@zenobius/opencode-skillful" # lazy load ]; default_agent = "plan"; tools = { skill = false; "qdrant_*" = false; }; mcp = { qdrant = { type = "local"; command = [ "${pkgs.uv}/bin/uvx" "-qq" "mcp-server-qdrant" ]; enabled = true; timeout = 5000; environment = { QDRANT_URL = "http://127.0.0.1:6333"; COLLECTION_NAME = "opencode_memory"; # Debug only: # FASTMCP_LOG_LEVEL = "DEBUG"; # FASTMCP_DEBUG = "true"; }; }; }; # Agents: features retained, but only injected when invoked agent = { plan = { mode = "primary"; tools = { write = false; edit = false; bash = false; skill = false; "qdrant_*" = false; }; }; build = { mode = "primary"; tools = { write = true; edit = true; bash = true; skill = false; "qdrant_*" = false; }; }; memory = { mode = "subagent"; description = "Opt-in semantic memory via Qdrant MCP"; tools = { "qdrant_*" = true; }; }; skills = { mode = "subagent"; description = "Opt-in skills tool"; tools = { skill = true; }; }; }; theme = "opencode"; autoupdate = false; share = "manual"; server = { port = 4096; hostname = "127.0.0.1"; }; provider = { "ollama" = { npm = "@ai-sdk/openai-compatible"; name = "Ollama (local)"; options = { baseURL = "http://10.20.0.201:11434/v1"; }; models = { "qwen2.5-coder:7b" = { name = "qwen2.5-coder"; }; "qwen3:8b" = { name = "qwen3"; }; }; }; }; }; rules = '' # Global rules (thin) - Prefer on-demand file loading over preloading large docs. - Use MCP/skills only via dedicated subagents. ''; }; ### default aria2.enable = true; btop.enable = true; command-not-found.enable = true; direnv = { enable = true; nix-direnv.enable = true; }; element-desktop = { enable = true; # settings = {}; }; eza = { enable = true; git = true; icons = "auto"; }; fastfetch.enable = true; firefox = { enable = true; package = pkgs.firefox; languagePacks = [ "en-US" ]; }; fish = { enable = true; functions = { fish_greeting = ""; nix-cleanup = '' sudo nix-collect-garbage --delete-older-than 30d && \ sudo nix-store --optimise ''; }; }; # ghostty = { # enable = true; # package = ghostty.packages.${system}.default; settings = { theme = "dark"; term = "xterm-256color"; scrollback-limit = 100000; # fullscreen = true; # title = ''"daft cunt can't set scrollback"''; }; themes = { dark = { background = "171421"; # cursor-color = "f5e0dc"; foreground = "D0CFCC"; palette = [ "0=#171421" "1=#C01C28" "2=#26A269" "3=#A2734C" "4=#12488B" "5=#A347BA" "6=#2AA1B3" "7=#D0CFCC" "8=#5E5C64" "9=#F66151" "10=#33D17A" "11=#E9AD0C" "12=#2A7BDE" "13=#C061CB" "14=#33C7DE" "15=#FFFFFF" ]; # selection-background = "171421"; # selection-foreground = "D0CFCC"; }; }; }; # lutris = { # enable = true; # defaultWinePackage = pkgs.wineWowPackages.full; runners = { wine = { settings = { runner = { # runner_executable = "${pkgs.wineWowPackages.full}/bin/wine"; }; system = { game_path = "/home/thek0tyara/Documents/lutris"; disable_runtime = false; prefer_system_libs = true; }; }; }; }; }; # nheko.enable = true; nix-your-shell.enable = true; obs-studio = { enable = true; plugins = with pkgs.obs-studio-plugins; [ wlrobs obs-pipewire-audio-capture ]; }; obsidian.enable = true; starship.enable = true; swayimg.enable = true; swaylock.enable = true; uv = { enable = true; # TODO move to nativeBuildInputs of needing settings = { python-downloads = "never"; python-preference = "only-system"; # pip.index-url = "https://pypi.org/simple"; }; }; vesktop = { enable = true; # package = vesktopNoFuses; # settings = { TODO }; }; vscode.enable = true; waybar.enable = true; wezterm = { enable = true; extraConfig = '' local wezterm = require 'wezterm' local config = wezterm.config_builder() config.default_prog = { "fish", "--login" --, "-c", "tmux attach -t dev || tmux new -s dev" } config.color_scheme = "Ayu Dark" config.hide_tab_bar_if_only_one_tab = true return config ''; }; yt-dlp = { enable = true; package = pkgs.yt-dlp; settings = { embed-thumbnail = true; downloader = "aria2c"; }; # extraConfig = '' # --extractor-args "youtube:player_client=default,ios,-android_sdkless" # ''; }; zed-editor = { enable = true; themes = { "name" = "Ayu Dark"; }; }; }; }