diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2de3680 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "custom/overlays"] + path = custom/overlays + url = https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git diff --git a/configuration.nix b/configuration.nix index 254b493..714be48 100644 --- a/configuration.nix +++ b/configuration.nix @@ -217,7 +217,7 @@ programs = { niri.enable = true; gnome-terminal.enable = true; - thunar.enable = true; + thunar.enable = true; # TODO: replace winbox = { enable = true; package = pkgs.winbox4; @@ -230,12 +230,6 @@ services = { openssh.enable = true; - tor = { - enable = true; - torsocks = { - enable = true; - }; - }; xrdp = { # enable = true; audio.enable = true; diff --git a/custom/overlays b/custom/overlays new file mode 160000 index 0000000..214f035 --- /dev/null +++ b/custom/overlays @@ -0,0 +1 @@ +Subproject commit 214f035438b22ce935cd5a547ed368da613bd985 diff --git a/custom/overlays/default.nix b/custom/overlays/default.nix deleted file mode 100644 index 65295f2..0000000 --- a/custom/overlays/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -final: prev: -import ../pkgs { - pkgs = final; - prev = prev; - lib = prev.lib; -} diff --git a/custom/overlays/override.nix b/custom/override.nix similarity index 83% rename from custom/overlays/override.nix rename to custom/override.nix index 3ee392d..5eb4543 100644 --- a/custom/overlays/override.nix +++ b/custom/override.nix @@ -1,12 +1,13 @@ final: prev: { - llama-cpp = prev.llama-cpp.overrideAttrs (old: { + llama-cpp = prev.llama-cpp.overrideAttrs (old: rec { + version = "8018"; src = prev.fetchFromGitHub { owner = "ggml-org"; repo = "llama.cpp"; - tag = "b7897"; - hash = "sha256-cc2tqEQEZCBEOQ+xJzmVK8ROjfsWOi6T2iX3KjpaAIU="; + tag = "b${version}"; + hash = "sha256-V60fAIZHVse3mD4Q7LodL2UxspdZorDDsSqlB/lMyGE="; }; - nativeBuildInputs = old.nativeBuildInputs ++ [ old.pkgs.curl ]; + # nativeBuildInputs = old.nativeBuildInputs ++ [ prev.pkgs.curl ]; }); pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (pyFinal: pyPrev: { diff --git a/custom/pkgs/by-category/default.nix b/custom/pkgs/by-category/default.nix deleted file mode 100644 index d6e3cc5..0000000 --- a/custom/pkgs/by-category/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - pkgs, - prev, - lib, - packagesFromTree, -}: -let - pythonPackagesDir = ./pythonPackages; - - treeExts = - if builtins.pathExists pythonPackagesDir then - [ - ( - python-final: python-prev: - removeAttrs (packagesFromTree pythonPackagesDir python-final.callPackage) [ - "python-packages" - ] - ) - ] - else - [ ]; - - fileExts = - if builtins.pathExists (pythonPackagesDir + "/prefab-builder.nix") then - [ - ( - python-final: python-prev: - prev.lib.customisation.callPackagesWith ( - python-prev - // { - lib = prev.lib; - pkgs = prev; # чтобы prefab-builder мог звать pkgs.callPackage - pyPkgs = python-prev; # явная подача python package set - fetchFromGitHub = prev.fetchFromGitHub; - # fetchPypi обычно уже есть в python-prev; если нет — добавь: - fetchPypi = prev.fetchPypi; - } - ) (pythonPackagesDir + "/prefab-builder.nix") { } - ) - ] - else - [ ]; -in -{ - pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ treeExts ++ fileExts; -} diff --git a/custom/pkgs/by-category/pythonPackages/ha/haystack-experimental/default.nix b/custom/pkgs/by-category/pythonPackages/ha/haystack-experimental/default.nix deleted file mode 100644 index a279d8c..0000000 --- a/custom/pkgs/by-category/pythonPackages/ha/haystack-experimental/default.nix +++ /dev/null @@ -1,280 +0,0 @@ -{ - # TODO - lib, - buildPythonPackage, - fetchFromGitHub, - hatchling, - hatch-vcs, - # haystack-ai, - # boilerpy3, - # events, - # httpx, - # jsonschema, - # lazy-imports, - # more-itertools, - # networkx, - # pandas, - # pillow, - # platformdirs, - # posthog, - # prompthub-py, - # pydantic, - # quantulum3, - # rank-bm25, - # requests, - # requests-cache, - # scikit-learn, - # sseclient-py, - # tenacity, - # tiktoken, - # tqdm, - # transformers, - # openai-whisper, - # boto3, - # botocore, - # # , beir - # selenium, - # coverage, - # dulwich, - # # , jupytercontrib - # mkdocs, - # mypy, - # pre-commit, - # psutil, - # # , pydoc-markdown - # pylint, - # pytest, - # pytest-asyncio, - # pytest-cov, - # # , pytest-custom-exit-code - # python-multipart, - # reno, - # responses, - # toml, - # tox, - # watchdog, - # elastic-transport, - # elasticsearch, - # # , azure-ai-formrecognizer - # beautifulsoup4, - # markdown, - # python-docx, - # python-frontmatter, - # python-magic, - # tika, - # black, - # huggingface-hub, - # sentence-transformers, - # mlflow, - # rapidfuzz, - # scipy, - # seqeval, - # pdf2image, - # pytesseract, - # faiss, - # # , faiss-gpu - # pinecone-client, - # onnxruntime, - # onnxruntime-tools, - # # , onnxruntime-gpu - # opensearch-py, - # pymupdf, - # langdetect, - # nltk, - # canals, - # jinja2, - # openai, - # aiorwlock, - # ray, - # psycopg2, - # sqlalchemy, - # sqlalchemy-utils, - # weaviate-client, -}: - -buildPythonPackage rec { - pname = "haystack-experimental"; - version = "0.19.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "deepset-ai"; - repo = "haystack-experimental"; - tag = "v${version}"; - hash = "sha256-G3rmlIApgG3CEpIG/9/wgTIMIrD35hZZMJCKdlwKpxA="; - }; - - # nativeBuildInputs = [ - # hatchling - # ]; - - # pythonRemoveDeps = [ - # # We call it faiss, not faiss-cpu. - # "faiss-cpu" - # ]; - - dontCheckRuntimeDeps = true; - - propagatedBuildInputs = [ - hatchling - hatch-vcs - # haystack-ai - # boilerpy3 - # events - # httpx - # jsonschema - # lazy-imports - # more-itertools - # networkx - # pandas - # pillow - # platformdirs - # posthog - # prompthub-py - # pydantic - # quantulum3 - # rank-bm25 - # requests - # requests-cache - # scikit-learn - # sseclient-py - # tenacity - # tiktoken - # tqdm - # transformers - ]; - - env.HOME = "$(mktemp -d)"; - - # optional-dependencies = { - # # all = [ - # # farm-haystack - # # ]; - # # all-gpu = [ - # # farm-haystack - # # ]; - # audio = [ openai-whisper ]; - # aws = [ - # boto3 - # botocore - # ]; - # # beir = [ - # # beir - # # ]; - # colab = [ pillow ]; - # crawler = [ selenium ]; - # dev = [ - # coverage - # dulwich - # # jupytercontrib - # mkdocs - # mypy - # pre-commit - # psutil - # # pydoc-markdown - # pylint - # pytest - # pytest-asyncio - # pytest-cov - # # pytest-custom-exit-code - # python-multipart - # reno - # responses - # toml - # tox - # watchdog - # ]; - # elasticsearch7 = [ - # elastic-transport - # elasticsearch - # ]; - # elasticsearch8 = [ - # elastic-transport - # elasticsearch - # ]; - # file-conversion = [ - # # azure-ai-formrecognizer - # beautifulsoup4 - # markdown - # python-docx - # python-frontmatter - # python-magic - # # python-magic-bin - # tika - # ]; - # formatting = [ black ]; - # inference = [ - # huggingface-hub - # sentence-transformers - # transformers - # ]; - # metrics = [ - # mlflow - # rapidfuzz - # scipy - # seqeval - # ]; - # ocr = [ - # pdf2image - # pytesseract - # ]; - # only-faiss = [ faiss ]; - # # only-faiss-gpu = [ - # # faiss-gpu - # # ]; - # only-pinecone = [ pinecone-client ]; - # onnx = [ - # onnxruntime - # onnxruntime-tools - # ]; - # # onnx-gpu = [ - # # onnxruntime-gpu - # # onnxruntime-tools - # # ]; - # opensearch = [ opensearch-py ]; - # pdf = [ pymupdf ]; - # preprocessing = [ - # langdetect - # nltk - # ]; - # preview = [ - # canals - # jinja2 - # lazy-imports - # openai - # pandas - # rank-bm25 - # requests - # tenacity - # tqdm - # ]; - # ray = [ - # aiorwlock - # ray - # ]; - # sql = [ - # psycopg2 - # sqlalchemy - # sqlalchemy-utils - # ]; - # weaviate = [ weaviate-client ]; - # }; - - # the setup for test is intensive, hopefully can be done at some point - doCheck = false; - - # pythonImportsCheck = [ "haystack" ]; - - meta = { - description = "Experimental features for Haystack"; - longDescription = '' - Experimental features for Haystack - ''; - changelog = "https://github.com/deepset-ai/haystack-experimental/releases/tag/${src.tag}"; - homepage = "https://github.com/deepset-ai/haystack-experimental"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ happysalada ]; - # https://github.com/deepset-ai/haystack/issues/5304 - # broken = false; - }; -} diff --git a/custom/pkgs/by-category/pythonPackages/ll/llama-cpp-agent/default.nix b/custom/pkgs/by-category/pythonPackages/ll/llama-cpp-agent/default.nix deleted file mode 100644 index 595f131..0000000 --- a/custom/pkgs/by-category/pythonPackages/ll/llama-cpp-agent/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - pythonOlder, - setuptools, - wheel, - # - llama-cpp-python, - pydantic, - requests, - docstring-parser, - aiohttp, -}: - -buildPythonPackage rec { - pname = "llama-cpp-agent"; - version = "0.2.35"; - pyproject = true; - - disabled = pythonOlder "3.9"; - - src = fetchFromGitHub { - owner = "Maximilian-Winter"; - repo = "llama-cpp-agent"; - rev = "${version}"; - hash = "sha256-r4bJK18JbuXndoNh6xdUvUjiUiw4Opuj/IQ+Tal0viQ="; - }; - - nativeBuildInputs = [ - # pythonRelaxDepsHook - setuptools - ]; - - # pythonRelaxDeps = [ - # "llama-cpp-python" - # ]; - - propagatedBuildInputs = [ - llama-cpp-python - pydantic - requests - docstring-parser - aiohttp - ]; - - pythonImportsCheck = [ "llama_cpp_agent" ]; - - meta = with lib; { - description = "A framework for easy interaction with Large Language Models (LLMs), supporting chat, structured function calls, and structured output"; - longDescription = '' - The llama-cpp-agent framework is a tool designed for easy interaction with Large Language Models (LLMs). - Allowing users to chat with LLM models, execute structured function calls and get structured output. - Works also with models not fine-tuned to JSON output and function calls. - ''; - homepage = "https://github.com/Maximilian-Winter/llama-cpp-agent"; - license = licenses.mit; - broken = true; - maintainers = with maintainers; [ ]; - }; -} diff --git a/custom/pkgs/by-category/pythonPackages/prefab-builder.nix b/custom/pkgs/by-category/pythonPackages/prefab-builder.nix deleted file mode 100644 index 05aedaf..0000000 --- a/custom/pkgs/by-category/pythonPackages/prefab-builder.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - pkgs, - lib, - pyPkgs, - fetchFromGitHub, - fetchPypi, -}: - -let - prefab = pkgs.callPackage ../../lib/prefab.nix { - inherit - lib - fetchFromGitHub - fetchPypi - pyPkgs - ; - }; -in -prefab.mkPrefabsRec ( - lib.customisation.callPackageWith pyPkgs ./prefab-specs.nix { - inherit lib; - } -) diff --git a/custom/pkgs/by-category/pythonPackages/prefab-specs.nix b/custom/pkgs/by-category/pythonPackages/prefab-specs.nix deleted file mode 100644 index 648c6dc..0000000 --- a/custom/pkgs/by-category/pythonPackages/prefab-specs.nix +++ /dev/null @@ -1,357 +0,0 @@ -{ - lib, - # fetchPypi, - hatchling, - poetry-core, - - huggingface-hub, - tqdm, - - aiohttp, - configparser, - google-api-core, - google-genai, - json-repair, - networkx, - numpy, - pandas, - pydantic, - pypinyin, - python-dotenv, - tenacity, - tiktoken, - xlsxwriter, - - boto3, - click, - loguru, - pdfminer-six, - requests, - httpx, - pillow, - pypdfium2, - pypdf, - reportlab, - modelscope, - opencv-python, - scikit-image, - openai, - beautifulsoup4, - magika, - - av, - - pdm-backend, - fasttext-predict, - - pydantic-settings, - - aiofiles, - hatch-fancy-pypi-readme, - - colorlog, - torch, - torchvision, - - wcwidth, - - matplotlib, - pyyaml, - scipy, - psutil, - py-cpuinfo, - seaborn, - albumentations, - - distutils, - ninja, -}: - -self: -let - inherit (self) # locally defined packages - lightrag-hku - mineru - nano-vectordb - pipmaster - ascii-colors - pdftext - fast-langdetect - mineru-vl-utils - qwen-vl-utils - thop - httpx-retries - robust-downloader - doclayout-yolo - ; -in -{ - raganything = { - url = "https://github.com/HKUDS/RAG-Anything/tree/v1.2.9"; - hash = "sha256-yepiLYzPD6UcJRbAbovg/BwFE8nh903o/tHypiHGKSw="; - propagatedBuildDeps = [ - huggingface-hub - lightrag-hku - mineru - tqdm - ] - ++ mineru.passthru.optional-dependencies.core; - pythonImportsCheck = [ "raganything" ]; - meta = { - description = "RAGAnything: All-in-One RAG System"; - license = lib.licenses.mit; - }; - }; - lightrag-hku = { - url = "https://github.com/HKUDS/LightRAG/tree/v1.4.9.11"; - hash = "sha256-TX/HSF2ZqoDo2SRlFzM+bkUxQXiUpnrl6kwI+lljjdo="; - propagatedBuildDeps = [ - aiohttp - configparser - google-api-core - google-genai - json-repair - nano-vectordb - networkx - numpy - pandas - pipmaster - pydantic - pypinyin - python-dotenv - tenacity - tiktoken - xlsxwriter - ]; - meta = { - description = "LightRAG: Simple and Fast Retrieval-Augmented Generation"; - license = lib.licenses.mit; - }; - }; - pipmaster = { - url = "https://github.com/ParisNeo/pipmaster/tree/820acdbc9d541443942bd8afd6ba968036bd8452"; - hash = "sha256-IJ6VG4WvoEm584vbZDLTtRcEZekZh7HJto1hnABoodo="; - force.version = "1.1.0"; - propagatedBuildDeps = [ - ascii-colors - ]; - meta = with lib; { - description = "A versatile Python package manager utility for simplifying package installation, updates, checks, and environment management."; - license = licenses.asl20; - }; - }; - nano-vectordb = { - url = "https://github.com/gusye1234/nano-vectordb/tree/03f821348f04a93a9c36bb575faae05b61f4c02e"; - hash = "sha256-jLco+1TAncF8Ep+VGd3DhsoiZTW7G/H8fAEwnNsovTY="; - force.version = "0.0.4.3"; - propagatedBuildDeps = [ - numpy - ]; - meta = { - description = "A simple, easy-to-hack Vector Database implementation"; - license = lib.licenses.mit; - }; - }; - ascii-colors = { - url = "https://github.com/ParisNeo/ascii_colors/tree/817a21485136635e3da89ff08444183254b25aab"; - hash = "sha256-zK4vM2sOfEFDJBpFjcJmQXljg3pgprP+VFuuk5JNWnE="; - force.version = "0.11.12"; - propagatedBuildDeps = [ - # wcwidth - ]; - meta = { - description = "A python library for displaying stuff on the console in a pretty way"; - license = lib.licenses.asl20; - }; - }; - mineru = { - url = "https://github.com/opendatalab/MinerU/tree/mineru-2.7.6-released"; - hash = "sha256-A/nFNQYGEfmWUdpX8N1lbex3mdiF8+eN8s0UKQFc42E="; - propagatedBuildDeps = [ - boto3 - click - loguru - numpy - pdfminer-six - tqdm - requests - httpx - pillow - pypdfium2 - pypdf - reportlab - pdftext - modelscope - huggingface-hub - json-repair - opencv-python - fast-langdetect - scikit-image - openai - beautifulsoup4 - magika - mineru-vl-utils - qwen-vl-utils - ]; - optional-dependencies = { - core = [ - doclayout-yolo - ] - # ++ (with mineru.optional-dependencies; [ - # vlm - # pipeline - # api - # gradio - # ]) - ; - # vlm = [ ]; - # pipeline = [ - # doclayout-yolo - # ]; - # api = [ ]; - # gradio = [ ]; - }; - pythonRelaxDeps = [ - "fast-langdetect" - ]; - meta = { - description = "Transforms complex documents like PDFs into LLM-ready markdown/JSON for your Agentic workflows."; - license = lib.licenses.gpl3; - }; - }; - doclayout-yolo = { - url = "https://pypi.org/project/doclayout-yolo/0.0.4/"; - hash = "sha256-gDEdEL7QPPiExb/MYkv+D9z/bnhLp2eZNHsCkNedy00="; - propagatedBuildDeps = [ - matplotlib - opencv-python - pillow - pyyaml - requests - scipy - torch - torchvision - tqdm - psutil - py-cpuinfo - thop - pandas - seaborn - albumentations - ]; - meta = { - description = "DocLayout-YOLO: Enhancing Document Layout Analysis through Diverse Synthetic Data and Global-to-Local Adaptive Perception"; - license = lib.licenses.agpl3Only; - }; - }; - thop = { - url = "https://pypi.org/project/thop/0.1.1.post2209072238/"; - force = { - format = "wheel"; - python = "py3"; - dist = "py3"; - }; - hash = "sha256-AUc8IlIxkn0q1xg1H3jr98/+avO+1GTE8boe8PfN2ic="; - propagatedBuildDeps = [ - distutils - ]; - meta = { - description = "Count the MACs / FLOPs of your PyTorch model."; - license = lib.licenses.mit; - }; - }; - qwen-vl-utils = { - url = "https://github.com/QwenLM/Qwen3-VL/tree/fe12058/qwen-vl-utils"; - hash = "sha256-Vha/Tc4q2v5RCL31hB9U4ZrfIFxfZjgwM6PYlvDeoAQ="; - force = { - version = "0.0.14"; - }; - propagatedBuildDeps = [ - hatchling - av - pillow - requests - torch - torchvision - ]; - pythonImportsCheck = [ "qwen_vl_utils" ]; - meta = { - description = "Qwen-VL Utils contains a set of helper functions for processing and integrating visual language information with Qwen-VL Series Model."; - license = lib.licenses.asl20; - }; - }; - mineru-vl-utils = { - url = "https://github.com/opendatalab/mineru-vl-utils/tree/mineru_vl_utils-0.1.22-released"; - hash = "sha256-hpTW/1nwXPxfld4nx0XHZBMerWj+UL1vzDhYpwjezRU="; - propagatedBuildDeps = [ - httpx - httpx-retries - aiofiles - pillow - pydantic - loguru - ]; - meta = { - description = "A Python package for interacting with the MinerU Vision-Language Model."; - license = lib.licenses.gpl3; - }; - }; - httpx-retries = { - url = "https://github.com/will-ockmore/httpx-retries/tree/0.4.5"; - hash = "sha256-zJ3ExSEWxlHFluSdYA8/XZ3zb4KBelU+IOFyUu4ezvo="; - propagatedBuildDeps = [ - hatchling - hatch-fancy-pypi-readme - httpx - ]; - meta = { - description = "A retry layer for HTTPX."; - license = lib.licenses.mit; - }; - }; - fast-langdetect = { - url = "https://github.com/LlmKira/fast-langdetect/tree/pypi_1.0.0"; - hash = "sha256-pj46gHG9cjkSjnYc88bSctL/1LAUe0jkBuM/GZWMsUI="; - propagatedBuildDeps = [ - pdm-backend - robust-downloader - requests - fasttext-predict - ]; - meta = { - description = "⚡️ 80x faster Fasttext language detection out of the box | Split text by language "; - license = lib.licenses.mit; - }; - }; - robust-downloader = { - url = "https://github.com/fedebotu/robust-downloader/tree/0.0.2"; - hash = "sha256-UmzfEIPiMtUkOG6sIMYgLxc8YwL5wRgMBRlywqKomv0="; - propagatedBuildDeps = [ - tqdm - colorlog - requests - ]; - meta = { - description = "Minimal Python downloader with robustness in mind - resumable downloads, retries, and more"; - license = lib.licenses.asl20; - }; - }; - pdftext = { - url = "https://github.com/datalab-to/pdftext/tree/v0.6.3"; - hash = "sha256-EGVjzjDWtdcEPX//cOm5+xm9FvX0aP+h6fsD25hC8gA="; - propagatedBuildDeps = [ - poetry-core - click - pydantic - pydantic-settings - pypdfium2 - ]; - pythonRelaxDeps = [ - "pypdfium2" - ]; - meta = { - description = "Extract structured text from pdfs quickly"; - license = lib.licenses.asl20; - }; - }; -} diff --git a/custom/pkgs/by-category/pythonPackages/python-packages.nix b/custom/pkgs/by-category/pythonPackages/python-packages.nix deleted file mode 100644 index bd0f209..0000000 --- a/custom/pkgs/by-category/pythonPackages/python-packages.nix +++ /dev/null @@ -1,371 +0,0 @@ -# { -# lib, -# fetchFromGitHub, -# buildPythonPackage, -# setuptools, -# wheel, -# hatchling, -# poetry-core, - -# python, - -# huggingface-hub, -# tqdm, - -# aiohttp, -# configparser, -# google-api-core, -# google-genai, -# json-repair, -# networkx, -# numpy, -# pandas, -# pydantic, -# pypinyin, -# python-dotenv, -# tenacity, -# tiktoken, -# xlsxwriter, - -# boto3, -# click, -# loguru, -# pdfminer-six, -# requests, -# httpx, -# pillow, -# pypdfium2, -# pypdf, -# reportlab, -# modelscope, -# opencv-python, -# scikit-image, -# openai, -# beautifulsoup4, -# magika, - -# av, - -# pdm-backend, -# fasttext-predict, - -# pydantic-settings, - -# aiofiles, -# hatch-fancy-pypi-readme, - -# colorlog, -# torch, -# torchvision, - -# wcwidth, -# }: - -# let -# prefab = -# { -# url, -# hash, -# force ? { }, -# meta ? { }, -# propagatedBuildDeps ? [ ], -# nativeBuildDeps ? [ ], -# pythonRelaxDeps ? [ ], -# pythonImportsCheck ? null, -# optional-dependencies ? null, -# }: -# let -# x = (import ../../lib/parse-github-url.nix { inherit lib; }) url; -# pname = x.pname; -# rev = force.rev or x.rev; -# version = force.version or x.version; - -# defaultImports = [ (lib.toLower (lib.replaceStrings [ "-" ] [ "_" ] pname)) ]; -# imports = if pythonImportsCheck == null then defaultImports else pythonImportsCheck; - -# rawSubdir = force.subdir or x.subdir or null; -# subdir = if rawSubdir == null then null else lib.removeSuffix "/" (lib.removePrefix "/" rawSubdir); - -# src = fetchFromGitHub { -# owner = x.owner; -# repo = x.repo; -# rev = rev; -# hash = hash; -# }; -# in -# buildPythonPackage ( -# { -# inherit pname version src; -# pyproject = true; - -# build-system = [ -# setuptools -# wheel -# ] -# ++ nativeBuildDeps; -# dependencies = propagatedBuildDeps; -# optional-dependencies = optional-dependencies; -# pythonRelaxDeps = pythonRelaxDeps; - -# pythonImportsCheck = imports; - -# installCheckPhase = '' -# runHook preInstallCheck -# ${builtins.concatStringsSep "\n" ( -# map (lib: '' -# ${python.interpreter} -c "import ${lib}; print(getattr(${lib},'__version__','unknown'))" -# '') imports -# )} -# runHook postInstallCheck -# ''; - -# meta = { -# homepage = x.homepage; -# } -# // meta; -# } -# // lib.optionalAttrs (subdir != null && subdir != "") { -# sourceRoot = "${src.name}/${subdir}"; -# } -# ); -# in -# rec { -# raganything = prefab { -# url = "https://github.com/HKUDS/RAG-Anything/tree/v1.2.9"; -# hash = "sha256-yepiLYzPD6UcJRbAbovg/BwFE8nh903o/tHypiHGKSw="; -# propagatedBuildDeps = [ -# huggingface-hub -# lightrag-hku -# tqdm -# # mineru -# ] -# ++ mineru.optional-dependencies.core; -# pythonImportsCheck = [ "raganything" ]; -# meta = { -# description = "RAGAnything: All-in-One RAG System"; -# license = lib.licenses.mit; -# }; -# }; -# lightrag-hku = prefab { -# url = "https://github.com/HKUDS/LightRAG/tree/v1.4.9.11"; -# hash = "sha256-TX/HSF2ZqoDo2SRlFzM+bkUxQXiUpnrl6kwI+lljjdo="; -# propagatedBuildDeps = [ -# aiohttp -# configparser -# google-api-core -# google-genai -# json-repair -# nano-vectordb -# networkx -# numpy -# pandas -# pipmaster -# pydantic -# pypinyin -# python-dotenv -# tenacity -# tiktoken -# xlsxwriter -# ]; -# meta = { -# description = "LightRAG: Simple and Fast Retrieval-Augmented Generation"; -# license = lib.licenses.mit; -# }; -# }; -# pipmaster = prefab { -# url = "https://github.com/ParisNeo/pipmaster/tree/820acdbc9d541443942bd8afd6ba968036bd8452"; -# hash = "sha256-IJ6VG4WvoEm584vbZDLTtRcEZekZh7HJto1hnABoodo="; -# force.version = "1.1.0"; -# propagatedBuildDeps = [ -# ascii-colors -# ]; -# meta = with lib; { -# description = "A versatile Python package manager utility for simplifying package installation, updates, checks, and environment management."; -# license = licenses.asl20; -# }; -# }; -# nano-vectordb = prefab { -# url = "https://github.com/gusye1234/nano-vectordb/tree/03f821348f04a93a9c36bb575faae05b61f4c02e"; -# hash = "sha256-jLco+1TAncF8Ep+VGd3DhsoiZTW7G/H8fAEwnNsovTY="; -# force.version = "0.0.4.3"; -# propagatedBuildDeps = [ -# numpy -# ]; -# meta = { -# description = "A simple, easy-to-hack Vector Database implementation"; -# license = lib.licenses.mit; -# }; -# }; -# ascii-colors = prefab { -# url = "https://github.com/ParisNeo/ascii_colors/tree/817a21485136635e3da89ff08444183254b25aab"; -# hash = "sha256-jiolJzsBQMp9/DHdHTixJGvXoS19vAp/S7+8PyLARoo="; -# force.version = "0.11.12"; -# propagatedBuildDeps = [ -# wcwidth -# ]; -# meta = { -# description = "A python library for displaying stuff on the console in a pretty way"; -# license = lib.licenses.asl20; -# }; -# }; -# mineru = prefab { -# url = "https://github.com/opendatalab/MinerU/tree/mineru-2.7.6-released"; -# hash = "sha256-A/nFNQYGEfmWUdpX8N1lbex3mdiF8+eN8s0UKQFc42E="; -# propagatedBuildDeps = [ -# boto3 -# click -# loguru -# numpy -# pdfminer-six -# tqdm -# requests -# httpx -# pillow -# pypdfium2 -# pypdf -# reportlab -# pdftext -# modelscope -# huggingface-hub -# json-repair -# opencv-python -# fast-langdetect -# scikit-image -# openai -# beautifulsoup4 -# magika -# mineru-vl-utils -# qwen-vl-utils -# ]; -# optional-dependencies = { -# core = [ doclayout-yolo ] -# # ++ (with mineru.optional-dependencies; [ -# # vlm -# # pipeline -# # api -# # gradio -# # ]) -# ; -# vlm = [ ]; -# pipeline = [ -# doclayout-yolo -# ]; -# api = [ ]; -# gradio = [ ]; -# }; -# pythonRelaxDeps = [ -# "fast-langdetect" -# ]; -# meta = { -# description = "Transforms complex documents like PDFs into LLM-ready markdown/JSON for your Agentic workflows."; -# license = lib.licenses.gpl3; -# }; -# }; -# doclayout-yolo = prefab { -# # reason for creating fetcher construct -# url = "https://github.com/opendatalab/DocLayout-YOLO/tree/main"; # master is 10 months old and last version was set in Oct 18, 2024 -# hash = "sha256-wLCmJuWyw7Gqou7awsHtxqVyr4AN+yJSkF0q3GUSQh8="; -# force.version = "0.0.4"; # NOT 0.0.4 on github but fuck it we ball -# meta = { -# description = "DocLayout-YOLO: Enhancing Document Layout Analysis through Diverse Synthetic Data and Global-to-Local Adaptive Perception"; -# license = lib.licenses.agpl3Only; -# }; -# }; -# qwen-vl-utils = prefab { -# url = "https://github.com/QwenLM/Qwen3-VL/tree/main/qwen-vl-utils"; -# hash = "sha256-Vha/Tc4q2v5RCL31hB9U4ZrfIFxfZjgwM6PYlvDeoAQ="; -# force = { -# version = "0.0.14"; -# rev = "fe12058"; -# }; -# propagatedBuildDeps = [ -# hatchling -# av -# pillow -# requests -# torch -# torchvision -# ]; -# pythonImportsCheck = [ "qwen_vl_utils" ]; -# meta = { -# description = "Qwen-VL Utils contains a set of helper functions for processing and integrating visual language information with Qwen-VL Series Model."; -# license = lib.licenses.asl20; -# }; -# }; -# mineru-vl-utils = prefab { -# url = "https://github.com/opendatalab/mineru-vl-utils/tree/mineru_vl_utils-0.1.22-released"; -# hash = "sha256-hpTW/1nwXPxfld4nx0XHZBMerWj+UL1vzDhYpwjezRU="; -# propagatedBuildDeps = [ -# httpx -# httpx-retries -# aiofiles -# pillow -# pydantic -# loguru -# ]; -# meta = { -# description = "A Python package for interacting with the MinerU Vision-Language Model."; -# license = lib.licenses.gpl3; -# }; -# }; -# httpx-retries = prefab { -# url = "https://github.com/will-ockmore/httpx-retries/tree/0.4.5"; -# hash = "sha256-zJ3ExSEWxlHFluSdYA8/XZ3zb4KBelU+IOFyUu4ezvo="; -# propagatedBuildDeps = [ -# hatchling -# hatch-fancy-pypi-readme - -# httpx -# ]; -# meta = { -# description = "A retry layer for HTTPX."; -# license = lib.licenses.mit; -# }; -# }; -# fast-langdetect = prefab { -# url = "https://github.com/LlmKira/fast-langdetect/tree/pypi_1.0.0"; -# hash = "sha256-pj46gHG9cjkSjnYc88bSctL/1LAUe0jkBuM/GZWMsUI="; -# propagatedBuildDeps = [ -# pdm-backend -# robust-downloader -# requests -# fasttext-predict -# ]; -# meta = { -# description = "⚡️ 80x faster Fasttext language detection out of the box | Split text by language "; -# license = lib.licenses.mit; -# }; -# }; -# robust-downloader = prefab { -# url = "https://github.com/fedebotu/robust-downloader/tree/0.0.2"; -# hash = "sha256-UmzfEIPiMtUkOG6sIMYgLxc8YwL5wRgMBRlywqKomv0="; -# propagatedBuildDeps = [ -# tqdm -# colorlog -# requests -# ]; -# meta = { -# description = "Minimal Python downloader with robustness in mind - resumable downloads, retries, and more"; -# license = lib.licenses.asl20; -# }; -# }; -# pdftext = prefab { -# url = "https://github.com/datalab-to/pdftext/tree/v0.6.3"; -# hash = "sha256-EGVjzjDWtdcEPX//cOm5+xm9FvX0aP+h6fsD25hC8gA="; -# propagatedBuildDeps = [ -# poetry-core - -# click -# pydantic -# pydantic-settings -# pypdfium2 -# ]; -# pythonRelaxDeps = [ -# "pypdfium2" -# ]; -# meta = { -# description = "Extract structured text from pdfs quickly"; -# license = lib.licenses.asl20; -# }; -# }; -# } diff --git a/custom/pkgs/by-name/an/anything-llm/default.nix b/custom/pkgs/by-name/an/anything-llm/default.nix deleted file mode 100644 index 87f9e9d..0000000 --- a/custom/pkgs/by-name/an/anything-llm/default.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - nodejs_20, - yarn, - fetchYarnDeps, - fixup-yarn-lock, - python3, - pkg-config, - # makeWrapper, - # openssl, - # sqlite, - vips, - vite, -}: - -let - pname = "anything-llm"; - version = "1.10.0"; - - src = fetchFromGitHub { - owner = "Mintplex-Labs"; - repo = "anything-llm"; - rev = "v${version}"; - hash = "sha256-W7wpgEJxo+IfIVRAWJNTmJL4RezO4NdlQEpV6dJp5IA="; - fetchSubmodules = true; - }; - - offlineCacheFrontend = fetchYarnDeps { - yarnLock = "${src}/frontend/yarn.lock"; - hash = "sha256-ebAV+1Ux4aL6hIodfaRVjEUFSWQplI7c7sybTEzucdw="; - }; - - offlineCacheServer = fetchYarnDeps { - yarnLock = "${src}/server/yarn.lock"; - hash = "sha256-+agJhFItPGLBUGLhhdNATiHuId51sDWQbG/Z1FyIVWM="; - }; -in -stdenv.mkDerivation { - inherit pname version src; - - nativeBuildInputs = [ - nodejs_20 - yarn - python3 - pkg-config - stdenv.cc # чтобы был компилятор/линкер - fixup-yarn-lock - vite - ]; - buildInputs = [ - vips - nodejs_20.dev - ]; - - # важно: чтобы sharp не пытался скачать vendor-libvips и не игнорировал системный - SHARP_FORCE_GLOBAL_LIBVIPS = "1"; # всегда пытаться использовать global libvips :contentReference[oaicite:0]{index=0} - npm_config_build_from_source = "sharp"; # просим sharp собираться из исходников :contentReference[oaicite:1]{index=1} - - configurePhase = '' - export HOME="$(mktemp -d)" - - pushd server - fixup-yarn-lock yarn.lock - yarn config --offline set yarn-offline-mirror "${offlineCacheServer}" - - # 1) ставим deps без postinstall'ов (иначе sharp полезет в сеть) - yarn install --offline --frozen-lockfile --ignore-scripts --no-progress - - # 2) теперь собираем sharp из исходников против system libvips - export PKG_CONFIG_PATH="${vips.dev}/lib/pkgconfig:${vips}/lib/pkgconfig:$PKG_CONFIG_PATH" - export LD_LIBRARY_PATH="${vips}/lib:$LD_LIBRARY_PATH" - export npm_config_nodedir="${nodejs_20.dev}" - - # yarn v1: rebuild прогоняет lifecycle для native-модулей - ${nodejs_20}/bin/npm rebuild sharp --build-from-source --nodedir="${nodejs_20.dev}" - popd - ''; - - postPatch = '' - # frontend: build without Qt/X11 postbuild - substituteInPlace frontend/package.json \ - --replace '"build": "vite build && node scripts/postbuild.js"' '"build": "vite build"' - ''; - - buildPhase = '' - runHook preBuild - (export QT_QPA_PLATFORM=offscreen QTWEBENGINE_DISABLE_SANDBOX=1 QTWEBENGINE_CHROMIUM_FLAGS="--headless --disable-gpu --no-sandbox" - cd frontend && yarn build) # --offline - # server/collector build steps, если нужны, добавите отдельно - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/lib/${pname} $out/bin - cp -r frontend server collector $out/lib/${pname}/ - - makeWrapper ${nodejs_20}/bin/node $out/bin/anything-llm-server \ - --chdir $out/lib/${pname}/server \ - --set NODE_ENV production \ - --set-default PORT 3001 \ - --add-flags "index.js" - runHook postInstall - ''; - - meta = with lib; { - description = "AnythingLLM (server + frontend + collector)"; - homepage = "https://github.com/Mintplex-Labs/anything-llm"; - license = licenses.mit; - platforms = platforms.linux; - }; -} diff --git a/custom/pkgs/by-name/lm/lmstudio/default.nix b/custom/pkgs/by-name/lm/lmstudio/default.nix deleted file mode 100644 index 46d5ea3..0000000 --- a/custom/pkgs/by-name/lm/lmstudio/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ - lib, - fetchurl, - appimageTools, - imagemagick, -}: - -let - pname = "lmstudio"; - version = "0.4.2-2"; - - url = "https://installers.lmstudio.ai/linux/x64/${version}/LM-Studio-${version}-x64.AppImage"; - - src = fetchurl { - inherit url; - hash = "sha256-JxGlqgsuLcW81mOIcntVFSHv19zSFouIChgz/egc+J0="; - }; - - contents = appimageTools.extractType2 { inherit pname version src; }; -in -appimageTools.wrapType2 { - inherit pname version src; - - nativeBuildInputs = [ imagemagick ]; - - extraInstallCommands = '' - set -euo pipefail - - mkdir -p "$out/share/applications" - mkdir -p "$out/share/icons/hicolor/256x256/apps" - - # ---- desktop: create fresh, never edit in place ---- - desktopSrc="$(find "${contents}" -type f -name '*.desktop' | head -n1 || true)" - if [ -n "$desktopSrc" ]; then - tmp="$(mktemp)" - - # Rewrite keys deterministically; keep everything else. - awk -v exec="${pname}" -v icon="${pname}" ' - BEGIN{hasExec=0;hasTry=0;hasIcon=0} - /^Exec=/{print "Exec="exec; hasExec=1; next} - /^TryExec=/{print "TryExec="exec; hasTry=1; next} - /^Icon=/{print "Icon="icon; hasIcon=1; next} - {print} - END{ - if(!hasExec) print "Exec="exec - if(!hasTry) print "TryExec="exec - if(!hasIcon) print "Icon="icon - } - ' "$desktopSrc" > "$tmp" - - rm -f "$out/share/applications/${pname}.desktop" - install -m444 "$tmp" "$out/share/applications/${pname}.desktop" - rm -f "$tmp" - fi - - # ---- icon: pick one, convert to canonical name ---- - icon="" - for cand in \ - "${contents}/.DirIcon" \ - "${contents}/AppIcon.png" \ - "${contents}/usr/share/icons/hicolor/512x512/apps/"*.png \ - "${contents}/usr/share/icons/hicolor/256x256/apps/"*.png \ - ; do - if [ -f "$cand" ]; then icon="$cand"; break; fi - done - if [ -z "$icon" ]; then - icon="$(find "${contents}" -type f -name '*.png' | head -n1 || true)" - fi - - if [ -n "$icon" ]; then - magick "$icon" -resize 256x256 "$out/share/icons/hicolor/256x256/apps/${pname}.png" - fi - ''; - - meta = with lib; { - description = "LM Studio (AppImage)"; - homepage = "https://lmstudio.ai/"; - license = licenses.unfreeRedistributable; - platforms = [ "x86_64-linux" ]; - mainProgram = pname; - }; -} diff --git a/custom/pkgs/by-name/st/stable-diffusion-cpp/default.nix b/custom/pkgs/by-name/st/stable-diffusion-cpp/default.nix deleted file mode 100644 index 73b5e95..0000000 --- a/custom/pkgs/by-name/st/stable-diffusion-cpp/default.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ - description = "stable-diffusion.cpp as a NixOS programs.* module (system nixpkgs)"; - - outputs = { self, ... }: { - nixosModules.default = { config, lib, pkgs, ... }: - let - cfg = config.programs.stable-diffusion-cpp; - - builtPackage = - pkgs.stdenv.mkDerivation { - pname = "stable-diffusion-cpp"; - version = "git"; - - src = pkgs.fetchFromGitHub { - owner = "leejet"; - repo = "stable-diffusion.cpp"; - rev = "master-453-4ff2c8c"; # pin to a commit for reproducibility - hash = "sha256-0Hl3M6NQK1ZfIH4eIdy/XiPZTeBCnRCtode88NipPp4="; - fetchSubmodules = true; - }; - - nativeBuildInputs = with pkgs; [ cmake ninja pkg-config ]; - - buildInputs = - (lib.optionals cfg.vulkan.enable (with pkgs; [ - vulkan-headers - vulkan-loader - shaderc - ])); - - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" - "-DSD_VULKAN=${if cfg.vulkan.enable then "ON" else "OFF"}" - ]; - - installPhase = '' - runHook preInstall - mkdir -p $out/bin - cp -v bin/sd $out/bin/ || cp -v sd $out/bin/ - runHook postInstall - ''; - }; - - selectedPackage = if cfg.package != null then cfg.package else builtPackage; - - extraEnvArgs = - lib.concatStringsSep " \\\n " - (lib.mapAttrsToList (k: v: - "--set ${lib.escapeShellArg k} ${lib.escapeShellArg v}" - ) cfg.extraEnv); - - wrappedPackage = - pkgs.symlinkJoin { - name = "${selectedPackage.pname or "stable-diffusion-cpp"}"; - paths = [ selectedPackage ]; - nativeBuildInputs = [ pkgs.makeWrapper ]; - postBuild = '' - if [ -x "$out/bin/sd" ]; then - wrapProgram "$out/bin/sd" \ - ${lib.optionalString (cfg.vulkan.enable && cfg.vulkan.icdFile != null) - "--set-default VK_ICD_FILENAMES ${lib.escapeShellArg (toString cfg.vulkan.icdFile)}"} \ - ${lib.optionalString (cfg.vulkan.enable && cfg.vulkan.prefixOpenGLXdgDataDirs) - "--prefix XDG_DATA_DIRS : /run/opengl-driver/share"} \ - ${extraEnvArgs} - fi - ''; - }; - - finalPackage = if cfg.wrap then wrappedPackage else selectedPackage; - in { - options.programs.stable-diffusion-cpp = { - enable = lib.mkEnableOption "stable-diffusion.cpp"; - - package = lib.mkOption { - type = lib.types.nullOr lib.types.package; - default = null; - description = "Override the package used (otherwise build from upstream source)."; - }; - - wrap = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Wrap the sd binary to inject environment variables."; - }; - - extraEnv = lib.mkOption { - type = lib.types.attrsOf lib.types.str; - default = { }; - description = "Extra environment variables added to the sd wrapper."; - }; - - vulkan = { - enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Build with Vulkan support (toggles -DSD_VULKAN and Vulkan deps)."; - }; - - icdFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - default = null; - example = /run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json; - description = "Optional VK_ICD_FILENAMES value to select a Vulkan ICD."; - }; - - prefixOpenGLXdgDataDirs = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Prefix XDG_DATA_DIRS with /run/opengl-driver/share (useful for Vulkan layers/ICDs on NixOS)."; - }; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ finalPackage ]; - }; - }; - }; -} diff --git a/custom/pkgs/default.nix b/custom/pkgs/default.nix deleted file mode 100644 index bce8587..0000000 --- a/custom/pkgs/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - pkgs, - prev, - lib, - ... -}: -let - dirs = path: lib.attrNames (lib.filterAttrs (_: t: t == "directory") (builtins.readDir path)); - - packagesFromTree = - base: callPackage: - lib.foldl' ( - acc: shorthand: - let - shorthandDir = base + "/${shorthand}"; - names = dirs shorthandDir; - - addOne = - name: - let - pkgDir = shorthandDir + "/${name}"; - in - if builtins.pathExists (pkgDir + "/default.nix") then - { ${name} = callPackage pkgDir { }; } - else - { }; - in - acc // lib.foldl' (a: n: a // addOne n) { } names - ) { } (dirs base); - - byNamePkgs = - if builtins.pathExists ./by-name then packagesFromTree ./by-name pkgs.callPackage else { }; - - byCategoryPkgs = import ./by-category { - inherit - pkgs - prev - lib - packagesFromTree - ; - }; -in -byNamePkgs // byCategoryPkgs diff --git a/custom/pkgs/lib/parse-github-url.nix b/custom/pkgs/lib/parse-github-url.nix deleted file mode 100644 index 3deb85a..0000000 --- a/custom/pkgs/lib/parse-github-url.nix +++ /dev/null @@ -1,40 +0,0 @@ -# { lib }: - -# url: -# let -# u0 = builtins.head (builtins.split "[?#]" url); -# u = lib.strings.removeSuffix "/" u0; - -# m = builtins.match "https://github.com/([^/]+)/([^/]+)(/(tree|tag|commit)/([^/]+)(/(.*))?)?" u; -# in -# assert m != null; -# let -# owner = builtins.elemAt m 0; -# repo = builtins.elemAt m 1; - -# kind = builtins.elemAt m 3; -# rev = builtins.elemAt m 4; - -# subdir = builtins.elemAt m 6; -# in -# { -# inherit -# owner -# repo -# kind -# rev -# subdir -# ; - -# version = -# if rev == null then -# null -# else -# let -# vm = builtins.match "^.*([0-9]+(\\.[0-9]+)+).*$" rev; -# in -# if vm == null then null else builtins.elemAt vm 0; - -# pname = repo; -# homepage = "https://github.com/${owner}/${repo}"; -# } diff --git a/custom/pkgs/lib/parse-source-ref.nix b/custom/pkgs/lib/parse-source-ref.nix deleted file mode 100644 index 0f00be8..0000000 --- a/custom/pkgs/lib/parse-source-ref.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ lib }: - -url: -let - # strip ?query/#fragment and trailing / - u0 = builtins.head (builtins.split "[?#]" url); - u = lib.removeSuffix "/" u0; - - # GitHub: https://github.com/owner/repo/(tree|tag|commit)/rev/(optional/subdir) - gh = builtins.match "https://github.com/([^/]+)/([^/]+)(/(tree|tag|commit)/([^/]+)(/(.*))?)?" u; - - # PyPI project page: https://pypi.org/project/name/version - pypiProject = builtins.match "https://pypi.org/project/([^/]+)(/([^/]+))?" u; - - # PyPI short form: - # pypi:requests@2.32.3 - # pypi:requests==2.32.3 - # pypi:requests/2.32.3 - pypiShort = builtins.match "^pypi:([^@=/]+)(==|@|/)?([^/]+)?$" u; -in -if gh != null then - let - owner = builtins.elemAt gh 0; - repo = builtins.elemAt gh 1; - - kind = builtins.elemAt gh 3; # null if absent - rev = builtins.elemAt gh 4; # null if absent - subdir = builtins.elemAt gh 6; # null or "a/b" - - version = - if rev == null then - null - else - let - vm = builtins.match "^.*([0-9]+(\\.[0-9]+)+).*$" rev; - in - if vm == null then null else builtins.elemAt vm 0; - in - { - type = "github"; - pname = repo; - homepage = "https://github.com/${owner}/${repo}"; - inherit - owner - repo - kind - rev - subdir - version - ; - } -else if pypiShort != null then - let - pname = builtins.elemAt pypiShort 0; - version = builtins.elemAt pypiShort 2; # may be null - in - { - type = "pypi"; - homepage = "https://pypi.org/project/${pname}/"; - inherit pname version; - subdir = null; - } -else if pypiProject != null then - let - pname = builtins.elemAt pypiProject 0; - version = builtins.elemAt pypiProject 2; # may be null - in - { - type = "pypi"; - homepage = "https://pypi.org/project/${pname}/"; - inherit pname version; - subdir = null; - } -else - throw "parse-source-ref: unsupported url: ${url}" diff --git a/custom/pkgs/lib/prefab.nix b/custom/pkgs/lib/prefab.nix deleted file mode 100644 index 2786b5a..0000000 --- a/custom/pkgs/lib/prefab.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ - lib, - fetchFromGitHub, - fetchPypi, - pyPkgs, -}: - -let - inherit (pyPkgs) - buildPythonPackage - setuptools - wheel - python - ; - - parseRef = import ./parse-source-ref.nix { inherit lib; }; - - mkPrefab = - { - url, - hash ? "", - force ? { }, - meta ? { }, - passthru ? { }, - propagatedBuildDeps ? [ ], - nativeBuildDeps ? [ ], - pythonRelaxDeps ? [ ], - pythonImportsCheck ? null, - optional-dependencies ? { }, - }: - let - ref = parseRef url; - - pname = force.pname or ref.pname; - - version = force.version or ref.version or "unstable"; - - isWheel = (force.format or null) == "wheel"; - - rev = force.rev or ref.rev or null; - - src = - if (force.src or null) != null then - force.src - else if ref.type == "github" then - ( - assert rev != null; - fetchFromGitHub { - owner = ref.owner; - repo = ref.repo; - inherit rev hash; - } - ) - else if ref.type == "pypi" then - ( - assert (force.version or ref.version or null) != null; - fetchPypi ( - lib.filterAttrs (_: v: v != null) { - pname = lib.replaceStrings [ "-" ] [ "_" ] pname; - inherit version hash; - format = force.format or null; - dist = force.dist or null; - python = force.python or null; - abi = force.abi or null; - platform = force.platform or null; - } - ) - ) - else - throw "mkPrefab: unsupported ref.type=${ref.type}"; - - defaultImports = [ (lib.toLower (lib.replaceStrings [ "-" ] [ "_" ] pname)) ]; - imports = if pythonImportsCheck == null then defaultImports else pythonImportsCheck; - - homepage = force.homepage or ref.homepage; - - passthru' = - passthru - // lib.optionalAttrs (optional-dependencies != { }) { - passthru.optional-dependencies = optional-dependencies; - }; - in - buildPythonPackage ( - { - inherit pname version src; - dependencies = propagatedBuildDeps; - pythonRelaxDeps = pythonRelaxDeps; - pythonImportsCheck = imports; - - dontBuild = (force.format or null) == "wheel"; - - installCheckPhase = '' - runHook preInstallCheck - ${builtins.concatStringsSep "\n" ( - map (mod: '' - ${python.interpreter} -c "import ${mod}; print(getattr(${mod},'__version__','unknown'))" - '') imports - )} - runHook postInstallCheck - ''; - - passthru = passthru'; - - meta = { - inherit homepage; - } - // meta; - sourceRoot = if ref.subdir != null then "source/${ref.subdir}" else null; - } - // lib.optionalAttrs isWheel { - format = "wheel"; - nativeBuildInputs = nativeBuildDeps; - } - // lib.optionalAttrs (!isWheel) { - pyproject = true; - build-system = [ - setuptools - wheel - ] - ++ nativeBuildDeps; - } - ); - mkPrefabs = specs: lib.mapAttrs (_: spec: mkPrefab spec) specs; - - mkPrefabsRec = specsFn: lib.fix (self: mkPrefabs (specsFn self)); -in -{ - inherit mkPrefab mkPrefabs mkPrefabsRec; -} diff --git a/devenv.nix b/devenv.nix index 110f646..c6349b0 100644 --- a/devenv.nix +++ b/devenv.nix @@ -10,6 +10,7 @@ # https://devenv.sh/scripts/ scripts = { update.exec = '' + git submodule update --init --recursive nix flake update ''; build.exec = '' diff --git a/flake.lock b/flake.lock index 99980d5..7e8b344 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "advisory-db": { + "flake": false, + "locked": { + "lastModified": 1769751671, + "narHash": "sha256-Pn4TZ+b+xQ9arFvnTmXCltyVsq5OynAm9v5pRCOyjVg=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "edfd9d41f20526aa7aea01ab374d0dac1626cdb6", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "agenix": { "inputs": { "darwin": "darwin", @@ -24,29 +40,6 @@ "type": "github" } }, - "classified": { - "inputs": { - "flake-utils": "flake-utils_2", - "naersk": "naersk", - "nixpkgs": [ - "intel-hw", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764756337, - "narHash": "sha256-XX4dxkM0ucoqgavjn78XLrXCrdv+RD4ZZvwZVfvr5ds=", - "owner": "GoldsteinE", - "repo": "classified", - "rev": "3bb7e22be468efc5a3c1b232d92a41a5a8c33ac0", - "type": "github" - }, - "original": { - "owner": "GoldsteinE", - "repo": "classified", - "type": "github" - } - }, "comoji": { "inputs": { "nixpkgs": [ @@ -69,31 +62,13 @@ "type": "github" } }, - "cosmic-unstable": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1767324719, - "narHash": "sha256-RD1IR25udmtmTIPfocuhuIzOK2C+M9nhTQ3mEfARECo=", - "owner": "ninelore", - "repo": "nixpkgs-cosmic-unstable", - "rev": "063c9631e355f6143f36f375aa2f96f7c22fdb0b", - "type": "github" - }, - "original": { - "owner": "ninelore", - "repo": "nixpkgs-cosmic-unstable", - "type": "github" - } - }, "crane": { "locked": { - "lastModified": 1766774972, - "narHash": "sha256-8qxEFpj4dVmIuPn9j9z6NTbU+hrcGjBOvaxTzre5HmM=", + "lastModified": 1771121070, + "narHash": "sha256-aIlv7FRXF9q70DNJPI237dEDAznSKaXmL5lfK/Id/bI=", "owner": "ipetkov", "repo": "crane", - "rev": "01bc1d404a51a0a07e9d8759cd50a7903e218c82", + "rev": "a2812c19f1ed2e5ed5ce2ef7109798b575c180e1", "type": "github" }, "original": { @@ -103,6 +78,21 @@ } }, "crane_2": { + "locked": { + "lastModified": 1769737823, + "narHash": "sha256-DrBaNpZ+sJ4stXm+0nBX7zqZT9t9P22zbk6m5YhQxS4=", + "owner": "ipetkov", + "repo": "crane", + "rev": "b2f45c3830aa96b7456a4c4bc327d04d7a43e1ba", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_3": { "locked": { "lastModified": 1741481578, "narHash": "sha256-JBTSyJFQdO3V8cgcL08VaBUByEU6P5kXbTJN6R0PFQo=", @@ -148,11 +138,11 @@ ] }, "locked": { - "lastModified": 1766150702, - "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", + "lastModified": 1771469470, + "narHash": "sha256-GnqdqhrguKNN3HtVfl6z+zbV9R9jhHFm3Z8nu7R6ml0=", "owner": "nix-community", "repo": "disko", - "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", + "rev": "4707eec8d1d2db5182ea06ed48c820a86a42dc13", "type": "github" }, "original": { @@ -166,11 +156,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1770872764, - "narHash": "sha256-n9/S8Y1HY6wr8hYGyq7ySuJB2KdF2kyWho+ofBLfvmA=", + "lastModified": 1771242501, + "narHash": "sha256-7azh4I/Qxz9e3liYmslBptv/wcCZfs2mjbLueKgz6PE=", "owner": "imaviso", "repo": "dwproton-flake", - "rev": "dd410d71c5ea1baa0ffff2686676d20d1f671893", + "rev": "4455649c5773abfc22244b36b5c542282dc76112", "type": "github" }, "original": { @@ -188,11 +178,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1767250179, - "narHash": "sha256-PnQdWvPZqHp+7yaHWDFX3NYSKaOy0fjkwpR+rIQC7AY=", + "lastModified": 1769929675, + "narHash": "sha256-EBpe7sXCPLs+qVePXbA7kc+Kmpmp0pWysEpjjEWTK+E=", "owner": "nix-community", "repo": "fenix", - "rev": "a3eaf682db8800962943a77ab77c0aae966f9825", + "rev": "78d518f5ca32a86dc767de481160dbae640c70cf", "type": "github" }, "original": { @@ -221,15 +211,47 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -238,16 +260,33 @@ "inputs": { "nixpkgs-lib": [ "intel-hw", - "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", "type": "github" }, "original": { @@ -275,24 +314,6 @@ } }, "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { "inputs": { "systems": "systems_7" }, @@ -320,11 +341,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1771168503, - "narHash": "sha256-CUWJRcnSUgcbcBfJZ4MH1DjT741a9Jflr6552Ph6BP4=", + "lastModified": 1771885510, + "narHash": "sha256-noHcKsh3hr4sTtCQn0L9cLcRnANTgRU/X0LuRpK4+q0=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "cfcc3aa142f0003662a1729899b604ef8239c464", + "rev": "b2a7f71b586b83d3b2bb6a17b8c2d79b123dc33f", "type": "github" }, "original": { @@ -334,7 +355,52 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": [ + "intel-hw", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { + "inputs": { + "nixpkgs": [ + "intel-hw", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "intel-hw", @@ -357,6 +423,29 @@ "type": "github" } }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "intel-hw", + "vaultix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -385,11 +474,11 @@ ] }, "locked": { - "lastModified": 1771188132, - "narHash": "sha256-qLXxN/tPrZtnekaLBQuVtxQfvqqs5cT5WbyH4zZaTGI=", + "lastModified": 1771851181, + "narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "ae8003d8b61d0d373e7ca3da1a48f9c870d15df9", + "rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c", "type": "github" }, "original": { @@ -406,11 +495,11 @@ ] }, "locked": { - "lastModified": 1767104570, - "narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=", + "lastModified": 1771519029, + "narHash": "sha256-H59Qf82wv5kBXVoyXsmUKW+9J3o8FqgY4uKaLdsLdLg=", "owner": "nix-community", "repo": "home-manager", - "rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf", + "rev": "167e0b6837115e672ec5f58e2b0ea39093abe807", "type": "github" }, "original": { @@ -443,25 +532,26 @@ }, "intel-hw": { "inputs": { - "classified": "classified", "comoji": "comoji", - "cosmic-unstable": "cosmic-unstable", "disko": "disko", "fenix": "fenix", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", "home-manager": "home-manager_3", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nu-env": "nu-env", - "nur": "nur", + "systems": "systems_4", "templates": "templates", - "valhali": "valhali" + "valhali": "valhali", + "vaultix": "vaultix" }, "locked": { - "lastModified": 1767389413, - "narHash": "sha256-3l9DWMTIaVUC++5l2oSBZYP86QYjFusD7J3BqivPRZk=", + "lastModified": 1771802471, + "narHash": "sha256-+4BK9fTD8fFarmwTTU78bGQwUbVZSmEM2yyZIzBeUvs=", "owner": "MordragT", "repo": "nixos", - "rev": "999ab929a2073cd4b1a72fa8944743de19d4c41b", + "rev": "168b703308f0b14f6af300b60b0db50498235b54", "type": "github" }, "original": { @@ -481,11 +571,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1767013031, - "narHash": "sha256-p8ANXBakAtfX/aEhLbU6w0tuQe3nrBvLdHbKirJP7ug=", + "lastModified": 1771492583, + "narHash": "sha256-nQzvnU4BGu8dA6BsPPCqmVcab/3ebVmHtX3ZWbW3Hxc=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "c2a82339373daee8cbbcad5f51f22ae6b71069e0", + "rev": "5e9380994665ef66c87ab8e22c913ff837174ce4", "type": "github" }, "original": { @@ -494,32 +584,10 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": [ - "intel-hw", - "classified", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1739824009, - "narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=", - "owner": "nix-community", - "repo": "naersk", - "rev": "e5130d37369bfa600144c2424270c96f0ef0e11d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, "niri": { "inputs": { - "nixpkgs": "nixpkgs_7", - "rust-overlay": "rust-overlay_2" + "nixpkgs": "nixpkgs_5", + "rust-overlay": "rust-overlay_3" }, "locked": { "lastModified": 1764399944, @@ -552,6 +620,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1770537093, @@ -567,27 +650,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1767116409, - "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cad22e7d996aea55ecab064e84834289143e44a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1767116409, - "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=", + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cad22e7d996aea55ecab064e84834289143e44a0", + "rev": "0182a361324364ae3f436a63005877674cf45efb", "type": "github" }, "original": { @@ -596,23 +663,7 @@ "type": "indirect" } }, - "nixpkgs_5": { - "locked": { - "lastModified": 1767116409, - "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cad22e7d996aea55ecab064e84834289143e44a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { + "nixpkgs_4": { "locked": { "lastModified": 1757584362, "narHash": "sha256-XeTX/w16rUNUNBsfaOVCDoMMa7Xu7KvIMT7tn1zIEcg=", @@ -626,7 +677,7 @@ "type": "indirect" } }, - "nixpkgs_7": { + "nixpkgs_5": { "locked": { "lastModified": 1757967192, "narHash": "sha256-/aA9A/OBmnuOMgwfzdsXRusqzUpd8rQnQY8jtrHK+To=", @@ -642,13 +693,13 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_6": { "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "rev": "0182a361324364ae3f436a63005877674cf45efb", "type": "github" }, "original": { @@ -658,7 +709,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_7": { "locked": { "lastModified": 1741379970, "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", @@ -683,11 +734,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1761290947, - "narHash": "sha256-AOOalZPOCh8uFVcs8qxyVeq7P+tfXxCs/aU8o+7uuSo=", + "lastModified": 1767894517, + "narHash": "sha256-QF7hieotASi8KTe6dhJEaRg+Ex0HO1SkoqwsILzwO4k=", "owner": "MordragT", "repo": "nu-env", - "rev": "ae30257182842068d97481f8fbbe850ca623b10f", + "rev": "0b6d3b1ee6a5535e13e28d94a85a6eba0585964d", "type": "github" }, "original": { @@ -696,29 +747,10 @@ "type": "github" } }, - "nur": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1767367154, - "narHash": "sha256-D7q0hcj+X0hesIhkDksvuyXbHagkGhfci+fV15wGwWM=", - "owner": "nix-community", - "repo": "NUR", - "rev": "c87d1f269298544231967f0e8f614333cf93b923", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "pre-commit": { "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore", + "flake-compat": "flake-compat_3", + "gitignore": "gitignore_2", "nixpkgs": [ "intel-hw", "lanzaboote", @@ -726,11 +758,11 @@ ] }, "locked": { - "lastModified": 1765911976, - "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", "type": "github" }, "original": { @@ -739,13 +771,37 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_4", + "gitignore": "gitignore_3", + "nixpkgs": [ + "intel-hw", + "vaultix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "ragenix": { "inputs": { "agenix": "agenix", - "crane": "crane_2", - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_9", - "rust-overlay": "rust-overlay_3" + "crane": "crane_3", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_7", + "rust-overlay": "rust-overlay_4" }, "locked": { "lastModified": 1741508717, @@ -769,18 +825,18 @@ "home-manager": "home-manager_2", "intel-hw": "intel-hw", "niri": "niri", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_6", "ragenix": "ragenix" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1767191410, - "narHash": "sha256-cCZGjubgDWmstvFkS6eAw2qk2ihgWkycw55u2dtLd70=", + "lastModified": 1769857242, + "narHash": "sha256-3eKpRRzKz0KzY7CJzRXFm4POwEqbuTohyQ2ajI/zKvg=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "a9026e6d5068172bf5a0d52a260bb290961d1cb4", + "rev": "17304e9c7e11d26139672d3d77aa498b1cae0d69", "type": "github" }, "original": { @@ -799,11 +855,11 @@ ] }, "locked": { - "lastModified": 1766976750, - "narHash": "sha256-w+o3AIBI56tzfMJRqRXg9tSXnpQRN5hAT15o2t9rxYw=", + "lastModified": 1771125043, + "narHash": "sha256-ldf/s49n6rOAxl7pYLJGGS1N/assoHkCOWdEdLyNZkc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9fe44e7f05b734a64a01f92fc51ad064fb0a884f", + "rev": "4912f951a26dc8142b176be2c2ad834319dc06e8", "type": "github" }, "original": { @@ -813,6 +869,28 @@ } }, "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "intel-hw", + "vaultix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769915446, + "narHash": "sha256-f1F/umtX3ZD7fF9DHSloVHc0mnAT0ry0YK2jI/6E0aI=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "bc00300f010275e46feb3c3974df6587ff7b7808", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { "inputs": { "nixpkgs": [ "niri", @@ -833,7 +911,7 @@ "type": "github" } }, - "rust-overlay_3": { + "rust-overlay_4": { "inputs": { "nixpkgs": [ "ragenix", @@ -961,7 +1039,7 @@ }, "templates": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1757668691, @@ -979,7 +1057,7 @@ }, "utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -997,7 +1075,7 @@ }, "utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -1053,6 +1131,32 @@ "type": "github" } }, + "vaultix": { + "inputs": { + "advisory-db": "advisory-db", + "crane": "crane_2", + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "intel-hw", + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1770047974, + "narHash": "sha256-86v8VZw+r4N/yLMlSSgsfQl+5fZ4YBtirp1WvipYKUw=", + "owner": "milieuim", + "repo": "vaultix", + "rev": "c71bedd526401a6b582fd0bcca979bc28485b81f", + "type": "github" + }, + "original": { + "owner": "milieuim", + "repo": "vaultix", + "type": "github" + } + }, "zig": { "inputs": { "flake-compat": [ diff --git a/flake.nix b/flake.nix index 93ae556..3a43e93 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,10 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + mypkgs = { + url = "ssh://forgejo@10.0.0.64/thek0tyara/nixpkgs-extension.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; ragenix.url = "github:yaxitech/ragenix/2025.03.09"; niri.url = "github:YaLTeR/niri/v25.11"; home-manager = { @@ -20,6 +24,7 @@ inputs@{ # self, nixpkgs, + mypkgs, ragenix, home-manager, ghostty, @@ -54,8 +59,9 @@ }; nixpkgs.overlays = [ intel-hw.overlays.default - (import ./custom/overlays/default.nix) - (import ./custom/overlays/override.nix) + # (import ./custom/overlays/default.nix) + mypkgs.overlays.default + (import ./custom/override.nix) ]; # boot.kernelPatches = [ # { @@ -96,7 +102,7 @@ }; age = { secrets = { - "wg/syscon0.key".file = ./secrets/wg/syscon0.key.age; + # "wg/syscon0.key".file = ./secrets/wg/syscon0.key.age; "github/token.ro.age" = { file = ./secrets/github/token.ro.age; owner = "root"; @@ -145,13 +151,29 @@ ### development git nixpkgs-fmt + nixfmt nixd - nil # apple-cursor + nil android-tools ]; }; - security.polkit = { - enable = true; + security = { + polkit = { + enable = true; + }; + sudo = { + extraRules = [ + { + commands = [ + { + command = "/run/current-system/sw/bin/nix"; + options = [ "NOPASSWD" ]; + } + ]; + groups = [ "wheel" ]; + } + ]; + }; }; # virtualisation.qemu = { # options = [ @@ -192,6 +214,14 @@ enable = true; pulse.enable = true; }; + tor = { + enable = true; + client.enable = true; + relay = { + enable = true; + role = "relay"; + }; + }; xserver = { enable = true; displayManager.lightdm.enable = true; @@ -201,6 +231,14 @@ options = "grp:alt_shift_toggle"; }; }; + zerotierone = { + enable = true; + localConf = { + settings = { + bind = [ "10.20.0.201" ]; + }; + }; + }; }; } ) diff --git a/home.nix b/home.nix index e8261e9..2820d6a 100644 --- a/home.nix +++ b/home.nix @@ -170,6 +170,9 @@ OLLAMA_MODELS = "/home/thek0tyara/Downloads/llm/ollama"; }; }; + podman = { + enable = true; + }; polkit-gnome.enable = true; qdrant = { enable = true; @@ -204,7 +207,7 @@ # extraArgs = [ ]; }; llama-cpp = { - # enable = true; + enable = true; package = pkgs.llama-cpp.override { vulkanSupport = true; rpcSupport = true; @@ -380,12 +383,14 @@ }; # ghostty = { - enable = true; - package = ghostty.packages.${system}.default; + # enable = true; + # package = ghostty.packages.${system}.default; settings = { theme = "dark"; term = "xterm-256color"; - scrollback-limit = 1000000; + scrollback-limit = 100000; + # fullscreen = true; + # title = ''"daft cunt can't set scrollback"''; }; themes = { dark = { @@ -434,6 +439,7 @@ }; }; }; + # nheko.enable = true; nix-your-shell.enable = true; obs-studio = { enable = true; @@ -461,6 +467,21 @@ }; 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;