commit 21c63f36926de490dd5b6ec59dbeb7bda2b15890 parent b0ea71c4ea45c2b22e36826a6763955e0e38ba80 Author: Vineet Kumar <git@vineetk.net> Date: Wed, 13 May 2026 18:36:02 -0400 split packages and services into separate channel Diffstat:
| D | epistemia/bootloader.scm | | | 41 | ----------------------------------------- |
| M | epistemia/channels.scm | | | 11 | +++-------- |
| M | epistemia/files/emacs/.config/emacs/init.el | | | 8 | ++++---- |
| D | epistemia/packages/audio.scm | | | 40 | ---------------------------------------- |
| D | epistemia/packages/bittorrent.scm | | | 18 | ------------------ |
| D | epistemia/packages/emacs.scm | | | 227 | ------------------------------------------------------------------------------- |
| D | epistemia/packages/firmware.scm | | | 146 | ------------------------------------------------------------------------------- |
| D | epistemia/packages/machine-learning.scm | | | 93 | ------------------------------------------------------------------------------- |
| D | epistemia/packages/minecraft.scm | | | 103 | ------------------------------------------------------------------------------- |
| D | epistemia/packages/suckless.scm | | | 95 | ------------------------------------------------------------------------------- |
| D | epistemia/packages/xorg.scm | | | 69 | --------------------------------------------------------------------- |
| D | epistemia/packages/zfs.scm | | | 15 | --------------- |
| D | epistemia/secrets/wg0psk_demiurge.age | | | 0 | |
| D | epistemia/secrets/wg0psk_hastur.age | | | 0 | |
| D | epistemia/services/age-secret.scm | | | 97 | ------------------------------------------------------------------------------- |
| D | epistemia/services/machine-learning.scm | | | 61 | ------------------------------------------------------------- |
| D | epistemia/services/zfs.scm | | | 40 | ---------------------------------------- |
17 files changed, 7 insertions(+), 1057 deletions(-)
diff --git a/epistemia/bootloader.scm b/epistemia/bootloader.scm @@ -1,41 +0,0 @@ -;;; SPDX-License-Identifier: GPL-3.0-or-later -(define-module (epistemia bootloader) - #:use-module (guix gexp) - #:use-module (guix utils) - #:use-module (gnu bootloader) - #:use-module (gnu bootloader grub)) - -(define-public grub-zfs - (bootloader - (inherit grub-efi-removable-bootloader) - (name 'grub-zfs) - (installer - #~(lambda (bootloader targets mount-point) - (use-modules (guix build utils)) - (let ((standard-installer #$(bootloader-installer grub-efi-bootloader))) - (standard-installer bootloader targets mount-point)) - (let ((grub-cfg (string-append mount-point "/boot/grub/grub.cfg"))) - (chmod grub-cfg #o644) - (substitute* grub-cfg - (("search --label --set [^ ]+") - "set root=(hd0,gpt2)") - ((" /store/") - " /gnu/@/store/"))))))) - -;; TODO combine into previous with an argument? -(define-public grub-zfs-bios - (bootloader - (inherit grub-bootloader) - (name 'grub-zfs) - (installer - #~(lambda (bootloader targets mount-point) - (use-modules (guix build utils)) - (let ((standard-installer #$(bootloader-installer grub-bootloader))) - (standard-installer bootloader targets mount-point)) - (let ((grub-cfg (string-append mount-point "/boot/grub/grub.cfg"))) - (chmod grub-cfg #o644) - (substitute* grub-cfg - (("search --label --set [^ ]+") - "set root=(hd0,gpt2)") - ((" /store/") - " /gnu/@/store/"))))))) diff --git a/epistemia/channels.scm b/epistemia/channels.scm @@ -1,4 +1,7 @@ (list (channel + (name 'epistemia) + (url "https://codeberg.org/vin/guix-epistemia")) + (channel (name 'nonguix) (url "https://codeberg.org/nonguix/nonguix-mirror") (branch "master") @@ -10,14 +13,6 @@ (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) (channel - (name 'guix-science) - (url "https://codeberg.org/guix-science/guix-science") - (introduction - (make-channel-introduction - "b1fe5aaff3ab48e798a4cce02f0212bc91f423dc" - (openpgp-fingerprint - "CA4F 8CF4 37D7 478F DA05 5FD4 4213 7701 1A37 8446")))) - (channel (name 'guix) (url "https://codeberg.org/guix/guix") (branch "master") diff --git a/epistemia/files/emacs/.config/emacs/init.el b/epistemia/files/emacs/.config/emacs/init.el @@ -375,16 +375,16 @@ (let* ((hostname (car (split-string (system-name) "\\."))) (cfgdir "/data/src/public/guixsd-config")) (message (format "Running guix system reconfigure for %s" hostname)) - (async-shell-command (format "sudo guix system reconfigure -L %s --skip-checks %s/epistemia/systems/%s.scm" - cfgdir cfgdir hostname)))) + (async-shell-command (format "sudo guix system reconfigure --skip-checks %s/epistemia/systems/%s.scm" + cfgdir hostname)))) (defun vin/guix-home-reconfigure () "Runs `guix home reconfigure` to reconfigure the current user's profile." (interactive) (let* ((cfgdir "/data/src/public/guixsd-config")) (message "Running guix home reconfigure") - (async-shell-command (format "guix home reconfigure -L %s %s/epistemia/home/config.scm" - cfgdir cfgdir)))) + (async-shell-command (format "guix home reconfigure %s/epistemia/home/config.scm" + cfgdir)))) ;; TODO: skeletor.el remake my templates? at least for org-mode (use-package skeletor) diff --git a/epistemia/packages/audio.scm b/epistemia/packages/audio.scm @@ -1,40 +0,0 @@ -(define-module (epistemia packages audio) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module (guix licenses) - #:use-module (gnu packages audio) - #:use-module (gnu packages linux) - #:use-module (gnu packages pkg-config)) - -(define-public zita-ajbridge - (package - (name "zita-ajbridge") - (version "0.8.4") - (source (origin - (method url-fetch) - (uri (string-append "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-ajbridge-" - version ".tar.bz2")) - (sha256 - (base32 - "0g5v0l0zmqh049mhv62n8s5bpm0yrlby7mkxxhs5qwadp8v4w9mw")))) - (build-system gnu-build-system) - (arguments - `(#:tests? #f ; No tests included - #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "MANDIR=" (assoc-ref %outputs "out") "/share/man/man1")) - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'enter-source-dir - (lambda _ (chdir "source") #t))))) ; No configure script, just Makefile - (native-inputs - (list pkg-config)) - (inputs - (list alsa-lib jack-2 zita-alsa-pcmi zita-resampler)) - (home-page "https://kokkinizita.linuxaudio.org/linuxaudio/zita-ajbridge.html") - (synopsis "Bridge ALSA devices into JACK") - (description "zita-ajbridge provides two applications, zita-a2j and zita-j2a. -They allow using an ALSA device as a JACK client, with high-quality resampling.") - (license gpl3+))) - diff --git a/epistemia/packages/bittorrent.scm b/epistemia/packages/bittorrent.scm @@ -1,18 +0,0 @@ -(define-module (epistemia packages bittorrent) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (gnu packages bittorrent) - #:use-module (gnu packages xml)) - -;; upstream rtorrent includes neither xmlrpc-c nor tinyxml2 -;; so, using the scgi socket errors out with other tools -;; tinyxml2 is used instead of xmlrpc-c for working utf8 -(define-public rtorrent-xmlrpc - (package - (inherit rtorrent) - (name "rtorrent-xmlrpc") - (inputs (modify-inputs (package-inputs rtorrent) - (append tinyxml2))) - (arguments - (list #:configure-flags #~'("--with-xmlrpc-tinyxml2"))))) diff --git a/epistemia/packages/emacs.scm b/epistemia/packages/emacs.scm @@ -1,227 +0,0 @@ -(define-module (epistemia packages emacs) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module (guix build-system emacs) - #:use-module ((guix licenses) :prefix license:) - #:use-module (gnu packages emacs-build) - #:use-module (gnu packages emacs-xyz)) - -(define-public emacs-kaolin-themes - (package - (name "emacs-kaolin-themes") - (version "1.7.4") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ogdenwebb/emacs-kaolin-themes") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1lbqvs2jqvs6x8gj7bali24mw2fl6gk184zln6avy6wmam7n8dqi")))) - (build-system emacs-build-system) - (propagated-inputs (list emacs-autothemer)) - (arguments - '(#:include '("^[^/]*.el$" "^[^/]*.el.in$" - "^dir$" - "^[^/]*.info$" - "^[^/]*.texi$" - "^[^/]*.texinfo$" - "^doc/dir$" - "^doc/[^/]*.info$" - "^doc/[^/]*.texi$" - "^doc/[^/]*.texinfo$" - "^themes/[^/]*.el$") - #:exclude '("^.dir-locals.el$" "^test.el$" "^tests.el$" - "^[^/]*-test.el$" "^[^/]*-tests.el$"))) - (home-page "https://github.com/ogdenwebb/emacs-kaolin-themes") - (synopsis "A set of eye pleasing themes") - (description - "Kaolin is a set of eye pleasing themes for GNU Emacs With support a large number -of modes and external packages. Kaolin themes are based on the pallete that was -originally inspired by Sierra.vim with adding some extra colors. ------- This -package includes the following themes ------- * kaolin-dark - a dark jade -variant inspired by Sierra.vim. * kaolin-light - light variant of the original -kaolin-dark. * kaolin-aurora - Kaolin meets polar lights. * kaolin-bubblegum - -Kaolin colorful theme with dark blue background. * kaolin-eclipse - a dark -purple variant. * kaolin-galaxy - bright theme based on one of the Sebastian -Andaur arts. * kaolin-mono-dark - almost monochrome dark green Kaolin theme. * -kaolin-mono-light - light variant of monochrome theme. * kaolin-ocean - dark -blue variant. * kaolin-shiva - theme with autumn colors and melanzane -background. * kaolin-temple - dark brown background with syntax highlighting -based on orange and cyan shades. * kaolin-valley-dark - colorful Kaolin theme -with brown background. * kaolin-valley-light - light version of -kaolin-valley-dark theme. ------- Configuration example ------- (require -kaolin-themes) (load-theme kaolin-dark t) ;; Apply treemacs customization for -Kaolin themes, requires the all-the-icons package. (kaolin-treemacs-theme) ;; Or -if you have use-package installed (use-package kaolin-themes :config (load-theme -kaolin-dark t) (kaolin-treemacs-theme)) ;; Custom theme settings ;; The -following set to t by default (setq kaolin-themes-bold t ; If nil, disable the -bold style. kaolin-themes-italic t ; If nil, disable the italic style. -kaolin-themes-underline t) ; If nil, disable the underline style. ------- Some -extra theme features, disabled by default ------- ;; If t, use the wave -underline style instead of regular underline. (setq kaolin-themes-underline-wave -t) ;; When t, will display colored hl-line style (setq -kaolin-themes-hl-line-colored t).") - (license license:gpl3))) - -(define-public emacs-gptel-new - (package - (name "emacs-gptel-new") - (version "20260410.711") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/karthink/gptel") - (commit "8d6411b5f89d796c817ff79324973b8910e164fe"))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0zl5qdp9qqh8chadsp2m3jpbpsxlywdlfkax8p97y73q1yias0q6")))) - (build-system emacs-build-system) - (propagated-inputs (list emacs-transient emacs-compat)) - (home-page "https://github.com/karthink/gptel") - (synopsis "Interact with ChatGPT or other LLMs") - (description - "gptel is a simple Large Language Model chat client, with support for multiple -models and backends. It works in the spirit of Emacs, available at any time and -in any buffer. gptel supports: - The services @code{ChatGPT}, Azure, Gemini, -Anthropic AI, Together.ai, Perplexity, AI/ML API, Anyscale, @code{OpenRouter}, -Groq, @code{PrivateGPT}, @code{DeepSeek}, Cerebras, Github Models, @code{GitHub} -Copilot chat, AWS Bedrock, Novita AI, @code{xAI}, Sambanova, Mistral Le Chat and -Kagi (@code{FastGPT} & Summarizer). - Local models via Ollama, Llama.cpp, -Llamafiles or GPT4All Additionally, any LLM service (local or remote) that -provides an @code{OpenAI-compatible} API is supported. Features: - Interact -with LLMs from anywhere in Emacs (any buffer, shell, minibuffer, wherever). - -LLM responses are in Markdown or Org markup. - Supports conversations and -multiple independent sessions. - Supports tool-use to equip LLMs with agentic -capabilities. - Supports Model Context Protocol (MCP) integration using the -mcp.el package. - Supports multi-modal models (send images, documents). - -Supports \"reasoning\" content in LLM responses. - Save chats as regular -Markdown/Org/Text files and resume them later. - You can go back and edit your -previous prompts or LLM responses when continuing a conversation. These will be -fed back to the model. - Redirect prompts and responses easily - Rewrite, -refactor or fill in regions in buffers. - Write your own commands for custom -tasks with a simple API. Requirements for @code{ChatGPT}, Azure, Gemini or Kagi: -- You need an appropriate API key. Set the variable `gptel-api-key to the key -or to a function of no arguments that returns the key. (It tries to use -`auth-source by default) @code{ChatGPT} is configured out of the box. For the -other sources: - For Azure: define a gptel-backend with `gptel-make-azure'. - -For Gemini: define a gptel-backend with `gptel-make-gemini'. - For Anthropic -(Claude): define a gptel-backend with `gptel-make-anthropic'. - For AI/ML API, -Together.ai, Anyscale, Groq, @code{OpenRouter}, @code{DeepSeek}, Cerebras or -Github Models: define a gptel-backend with `gptel-make-openai'. - For -@code{PrivateGPT}: define a backend with `gptel-make-privategpt'. - For -Perplexity: define a backend with `gptel-make-perplexity'. - For Deepseek: -define a backend with `gptel-make-deepseek'. - For Kagi: define a gptel-backend -with `gptel-make-kagi'. For local models using Ollama, Llama.cpp or GPT4All: - -The model has to be running on an accessible address (or localhost) - Define a -gptel-backend with `gptel-make-ollama or `gptel-make-gpt4all'. - Llama.cpp or -Llamafiles: Define a gptel-backend with `gptel-make-openai'. Consult the -package README for examples and more help with configuring backends. Usage: -gptel can be used in any buffer or in a dedicated chat buffer. The interaction -model is simple: Type in a query and the response will be inserted below. You -can continue the conversation by typing below the response. To use this in any -buffer: - Call `gptel-send to send the buffer's text up to the cursor. Select a -region to send only the region. - You can select previous prompts and responses -to continue the conversation. - Call `gptel-send with a prefix argument to -access a menu where you can set your backend, model and other parameters, or to -redirect the prompt/response. To use this in a dedicated buffer: - M-x gptel: -Start a chat session. - In the chat session: Press `C-c RET (`gptel-send') to -send your prompt. Use a prefix argument (`C-u C-c RET') to access a menu. In -this menu you can set chat parameters like the system directives, active backend -or model, or choose to redirect the input or output elsewhere (such as to the -kill ring or the echo area). - You can save this buffer to a file. When opening -this file, turn on `gptel-mode before editing it to restore the conversation -state and continue chatting. - To include media files with your request, you can -add them to the context (described next), or include them as links in Org or -Markdown mode chat buffers. Sending media is disabled by default, you can turn -it on globally via `gptel-track-media', or locally in a chat buffer via the -header line. Include more context with requests: If you want to provide the LLM -with more context, you can add arbitrary regions, buffers, files or directories -to the query with `gptel-add'. To add text or media files, call `gptel-add in -Dired or use the dedicated `gptel-add-file'. You can also add context from -gptel's menu instead (`gptel-send with a prefix arg), as well as examine or -modify context. When context is available, gptel will include it with each LLM -query. LLM Tool use: gptel supports \"tool calling\" behavior, where LLMs can -specify arguments with which to call provided \"tools\" (elisp functions). The -results of running the tools are fed back to the LLM, giving it capabilities and -knowledge beyond what is available out of the box. For example, tools can -perform web searches or API lookups, modify files and directories, and so on. -Tools can be specified via `gptel-make-tool', or obtained from other -repositories, or from Model Context Protocol (MCP) servers using the mcp.el -package. See the README for details. Tools can be included with LLM queries -using gptel's menu, or from `gptel-tools'. Rewrite interface In any buffer: -with a region selected, you can rewrite prose, refactor code or fill in the -region. This is accessible via `gptel-rewrite', and also from the `gptel-send -menu. Presets Define a bundle of configuration (model, backend, system message, -tools etc) as a \"preset\" that can be applied together, making it easy to switch -between tasks in gptel. Presets can be saved and applied from gptel's transient -menu. You can also include a cookie of the form \"@@preset-name\" in the prompt -to send a request with a preset applied. This feature works everywhere, but -preset cookies are also fontified in chat buffers. gptel in Org mode: gptel -offers a few extra conveniences in Org mode: - You can limit the conversation -context to an Org heading with `gptel-org-set-topic'. - You can have branching -conversations in Org mode, where each hierarchical outline path through the -document is a separate conversation branch. See the variable -`gptel-org-branching-context'. - You can declare the gptel model, backend, -temperature, system message and other parameters as Org properties with the -command `gptel-org-set-properties'. gptel queries under the corresponding -heading will always use these settings, allowing you to create mostly -reproducible LLM chat notebooks. Finally, gptel offers a general purpose API -for writing LLM ineractions that suit your workflow. See `gptel-request', and -`gptel-fsm for more advanced usage.") - (license license:gpl3))) - -(define-public emacs-gptel-agent - (package - (name "emacs-gptel-agent") - (version "20260412.716") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/karthink/gptel-agent") - (commit "bef06bccdbf847e0c4a94d1b57dd96d979437430"))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1g33w8db2g33l3qf4f9vnafkdpilaxh4s9cy76yv79rphg92ipaw")))) - (build-system emacs-build-system) - (propagated-inputs (list emacs-compat emacs-gptel-new emacs-yaml - emacs-orderless)) - (arguments - '(#:include '("^[^/]*.el$" "^[^/]*.el.in$" - "^dir$" - "^[^/]*.info$" - "^[^/]*.texi$" - "^[^/]*.texinfo$" - "^doc/dir$" - "^doc/[^/]*.info$" - "^doc/[^/]*.texi$" - "^doc/[^/]*.texinfo$" - "^agents$") - #:exclude '("^.dir-locals.el$" "^test.el$" "^tests.el$" - "^[^/]*-test.el$" "^[^/]*-tests.el$"))) - (home-page "https://github.com/karthink/gptel-agent") - (synopsis "Agentic LLM use for gptel") - (description - "This is a collection of tools and prompts to use gptel \"agentically\" with any -LLM, to autonomously perform tasks. It has access to - the web (via basic web -search, URL fetching and @code{YouTube} video metadata), - local files -(read/write/edit), - the state of Emacs (documentation and Elisp evaluation), - -and Bash, if you are in a POSIX-y environment. To use gptel-agent in a -dedicated buffer: - Set `gptel-model and `gptel-backend to use your preferred -LLM. - Run M-x `gptel-agent'. This will open a buffer with the agent preset -loaded. - Use gptel as usual, calling `gptel-send etc. - If you change the -system prompt, tools or other settings in this buffer, you can reset the agent -state by (re)applying the \"gptel-agent\" preset from gptel's menu. To use -gptel-agent anywhere in Emacs: - As with gptel, you can use gptel-agent in any -buffer. Just apply the \"gptel-agent\" preset in the buffer, or include -\"@@gptel-agent\" in a prompt. gptel-agent can delegate tasks to \"sub-agents\". -Sub-agents can be specified in Markdown or Org files in a directory. To see how -to specify agents, examine the \"agents\" directory in this package. You can add -your directory of agents to `gptel-agent-dirs', which see. Please note: -gptel-agent uses significantly more tokens than the average gptel LLM -interaction.") - (license license:gpl3))) diff --git a/epistemia/packages/firmware.scm b/epistemia/packages/firmware.scm @@ -1,146 +0,0 @@ -(define-module (epistemia packages firmware) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix build-system gnu) - #:use-module (guix git-download) - #:use-module (guix gexp) - #:use-module (guix import egg) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (gnu packages embedded) - #:use-module (gnu packages firmware) - #:use-module (ice-9 regex)) - -;; originally from guix upstream, but it's old and only for avr -(define* (make-qmk-firmware-rp2040 keyboard keymap - #:key (description "") - keymap-json - keymap-source-directory - keyboard-source-directory) - "Return a package to build the QMK firmware for KEYBOARD with KEYMAP. -Keyboard should be the name of a sub-directory under the @file{keyboards} directory. -For custom keymaps, KEYMAP-JSON, a file-like object of a JSON representation of -KEYMAP as generated by the @url{https://config.qmk.fm/, QMK Configurator} tool or -KEYMAP-SOURCE-DIRECTORY, a file-like object directory containing the keymap source -files files such as @file{keymap.c}, can be provided. For keyboards not available in -upstream repository, provide a file-like object directory containing the whole -keyboard definition in KEYBOARD-SOURCE-DIRECTORY." - (package - (name (string-append "qmk-firmware-" - (regexp-substitute/global #f "[_/]" keyboard - 'pre "-" 'post) - "-" - (string-replace-substring keymap "_" "-"))) - (version "0.31.9") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/qmk/qmk_firmware") - (commit version))) - (file-name (git-file-name "qmk-firmware" version)) - (sha256 - (base32 - "1vc0lp4k6816mgb8l73jmj6kv3b8ij23i9ia9y9s4f72h8z9j91c")))) - (build-system gnu-build-system) - (arguments - (list - #:modules '((guix build gnu-build-system) - (guix build utils) - (ice-9 ftw) - (ice-9 match) - (srfi srfi-26)) - #:target "arm-none-eabi" - ;; XXX: Running a test target like "test:$keyboard" doesn't seem to run - ;; anything and causes the .hex file to be regenerated; leave the tests - ;; out for now. - #:tests? #f - #:make-flags - #~(list #$(format #f "~a:~a" keyboard keymap) - (string-append "SHELL=" (search-input-file - %build-inputs "bin/sh")) - "CONVERT_TO=rp2040_ce") - #:phases - #~(modify-phases %standard-phases - (replace 'configure - (lambda _ - ;; Do not attempt to retrieve information from git during the - ;; build. - (setenv "SKIP_GIT" "1"))) - (add-after 'unpack 'copy-chibios-source - (lambda _ - (copy-recursively - #$(let ((commit "8bd61b804303f1614d574546c2dd735eeabb09f5")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/qmk/chibios") - (commit commit))) - (file-name (git-file-name "chibios" commit)) - (sha256 - (base32 - "1waixxdgr48385k1dkf6zpvngdpp78kagkvdpag9y9pg610gqzd2")))) - "lib/chibios"))) - #$@(if keyboard-source-directory - #~((add-after 'unpack 'copy-keyboard-source-directory - (lambda _ - (let ((keyboard-dir #$(string-append "keyboards/" keyboard))) - (false-if-exception (delete-file-recursively - keyboard-dir)) - (copy-recursively #$keyboard-source-directory - keyboard-dir))))) - #~()) - #$@(if keymap-source-directory - #~((add-after 'unpack 'copy-keymap-source-directory - (lambda _ - (let ((keymap-dir #$(string-append "keyboards/" keyboard - "/keymaps/" keymap))) - (false-if-exception (delete-file-recursively - keymap-dir)) - (copy-recursively #$keymap-source-directory - keymap-dir))))) - #~()) - #$@(if keymap-json - #~((replace 'build - (lambda _ - (invoke "qmk" "compile" #$keymap-json)))) - #~()) - (replace 'install - (lambda _ - (match (scandir "." (lambda (f) - (false-if-exception - (member (string-take-right f 4) - '(".bin" ".hex" ".uf2"))))) - (() - (error "no built binary file found")) - ((hex ..1) - (for-each (cut install-file <> #$output) hex)))))))) - ;; Some of the build tools are required to be on the PATH, as the make - ;; files do not always operate through 'qmk'; all of qmk's inputs must - ;; thus be made available. - (native-inputs (modify-inputs (package-inputs qmk) - (append qmk - (make-newlib-nano-arm-none-eabi)))) - (home-page "https://qmk.fm/") - (synopsis "Keyboard firmware for Atmel AVR and Arm USB families") - (description - (format #f "QMK (Quantum Mechanical Keyboard Firmware) is a keyboard -firmware based on the @url{https://github.com/tmk/tmk_keyboard, tmk_keyboard -firmware} with some useful features for Atmel AVR and ARM controllers, and -more specifically, the @url{https://olkb.com/, OLKB product line}, the -@url{https://ergodox-ez.com/, ErgoDox EZ keyboard}, and the -@url{https://clueboard.co/, Clueboard product line}.~@[~%~%~a~]" description)) - (license license:gpl2+))) - -(define-public qmk-crkbd - (make-qmk-firmware "crkbd" "default" #:description - "The default keymap for the Corne keyboard, a split keyboard with 3x6 vertically -staggered keys and 3 thumb keys.")) - -(define-public qmk-ferris-sweep - (make-qmk-firmware-rp2040 "ferris/sweep" "default" #:description - "The default keymap for the Ferris Sweep keyboard, a version of the -Ferris 3x5+2 split keyboard with a daughterboard for MCU.")) - -(define-public qmk-ploopy-adept - (make-qmk-firmware-rp2040 "ploopyco/madromys" "default" #:description - "The default keymap for the Ploopy Adept open-hardware programmable -trackball mouse.")) diff --git a/epistemia/packages/machine-learning.scm b/epistemia/packages/machine-learning.scm @@ -1,93 +0,0 @@ -(define-module (epistemia packages machine-learning) - #:use-module (guix packages) - #:use-module (guix build-system go) - #:use-module (guix download) - #:use-module (guix utils) - #:use-module (guix git-download) - #:use-module (guix gexp) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages base) - #:use-module (gnu packages golang-check) - #:use-module (gnu packages golang-web) - #:use-module (gnu packages golang-xyz) - #:use-module (gnu packages llvm) - #:use-module (gnu packages machine-learning) - #:use-module (gnu packages rocm) - #:use-module (gnu packages rocm-libs)) - -(define-public llama-cpp-rocm - (let ((tag "b9082")) - (package - (inherit llama-cpp) - (name "llama-cpp-rocm") - (version (string-append "0.0.0-" tag)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ggml-org/llama.cpp") - (commit tag))) - (file-name (git-file-name name tag)) - (sha256 - (base32 "1y1qf4ig4xziyrx1vp87s7v1c2zs475l59yfx4ld5f2gpmibazgy")))) - (arguments - (substitute-keyword-arguments (package-arguments llama-cpp) - ((#:configure-flags flags #~'()) - #~(append #$flags - '(;; CMAKE_HIP_FLAGS is to workaround regression in ROCm 7.2 - "-DCMAKE_HIP_FLAGS=\"-mllvm --amdgpu-unroll-threshold-local=600\"" - "-DGPU_TARGETS=gfx1100"))) - ((#:phases phases) - #~(modify-phases #$phases - ;; the test-chat test got two new extra lines that need to be removed - (add-after 'fix-tests 'fix-tests-new - (lambda _ - (substitute* "tests/CMakeLists.txt" - (("target_include_directories\\(test-chat PRIVATE.*") - "") - (("target_link_libraries\\(test-chat PRIVATE.*") - "")))))))) - (inputs - (modify-inputs (package-inputs llama-cpp) - (replace "ggml" ggml-rocm)))))) - -(define-public ggml-rocm - (package - (inherit (@@ (gnu packages machine-learning) ggml)) - (name "ggml-rocm") - (version "0.11.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ggml-org/ggml") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1794r8v3rbzb6pcspf232dxvpprxac3n2k79swrbr8s7z5q5mxsg")))) - (arguments - (substitute-keyword-arguments (package-arguments (@@ (gnu packages machine-learning) ggml)) - ((#:configure-flags flags #~'()) - #~(append #$flags (list (string-append "-DCMAKE_HIP_COMPILER_ROCM_ROOT=" #$rocm-hip-runtime) - (string-append "-DCMAKE_HIP_FLAGS=--rocm-path=" #$rocm-hip-runtime - " --rocm-device-lib-path=" #$rocm-device-libs "/amdgcn/bitcode") - "-DGPU_TARGETS=gfx1100" - "-DGGML_CPU=ON" - "-DGGML_HIP=ON" - "-DGGML_HIP_ROCWMMA_FATTN=OFF" - "-DGGML_CUDA_FA_ALL_QUANTS=ON" - ;; for stable-diffusion.cpp - "-DGGML_CPU_ALL_VARIANTS=ON" - "-DGGML_MAX_NAME=128"))))) - (inputs - (modify-inputs (package-inputs (@@ (gnu packages machine-learning) ggml)) - (append clang-rocm - lld-rocm - rocm-cmake - rocm-device-libs - rocm-hipcc - rocm-hip-runtime - rocr-runtime - hipblas - hipblas-common - rocblas))))) diff --git a/epistemia/packages/minecraft.scm b/epistemia/packages/minecraft.scm @@ -1,103 +0,0 @@ -(define-module (epistemia packages minecraft) - #:use-module (guix build-system cmake) - #:use-module (gnu packages audio) - #:use-module (gnu packages bash) - #:use-module (gnu packages compression) - #:use-module (gnu packages jemalloc) - #:use-module (gnu packages linux) - #:use-module (gnu packages qt) - #:use-module (gnu packages xorg) - #:use-module (gnu packages gl) - #:use-module (gnu packages java) - #:use-module (gnu packages kde-frameworks) - #:use-module (guix packages) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module ((guix licenses) :prefix license:) - #:use-module ((nonguix licenses) :prefix non-license:)) - -(define-public prismlauncher - (package - (name "prismlauncher") - (version "9.4") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/PrismLauncher/PrismLauncher") - (recursive? #t) - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1xxgyx0z5r3hk3yk4gglbfwvq2qk1j9a0dkrv55j4vrlkni79nrm")))) - (build-system cmake-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'patch-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin/prismlauncher")) - (xrandr (assoc-ref inputs "xrandr")) - (qtwayland (assoc-ref inputs "qtwayland")) - (qtsvg (assoc-ref inputs "qtsvg")) - (jdk17 (assoc-ref inputs "jdk17")) - (jdk25 (assoc-ref inputs "jdk25"))) - (wrap-program bin - `("JAVA_HOME" = (,jdk25)) - `("PATH" ":" prefix (,(string-append xrandr "/bin") - ,(string-append jdk17 "/bin") - ,(string-append jdk25 "/bin"))) - `("QT_PLUGIN_PATH" ":" prefix ,(map (lambda (package) - (string-append package "/lib/qt6/plugins")) - (list qtwayland qtsvg))) - `("LD_LIBRARY_PATH" ":" prefix - (,@(map (lambda (dep) - (string-append (assoc-ref inputs dep) - "/lib")) - '("libx11" "libxext" "libxcursor" - "libxrandr" "libxxf86vm" "mesa" - "glfw" "openal" "jemalloc" "alsa-lib"))))) - #t)))))) - (native-inputs (list extra-cmake-modules)) - (inputs - `(("bash" ,bash-minimal) - ("zlib" ,zlib) - ("qtbase" ,qtbase) - ("qt5compat" ,qt5compat) - ("qtnetworkauth" ,qtnetworkauth) - ("qtwayland" ,qtwayland) - ("qtsvg" ,qtsvg) - ("xrandr" ,xrandr) - ("libx11" ,libx11) - ("libxext" ,libxext) - ("libxcursor" ,libxcursor) - ("libxrandr" ,libxrandr) - ("libxxf86vm" ,libxxf86vm) - ("mesa" ,mesa) - ("glfw" ,glfw) - ("openal" ,openal) - ("alsa-lib" ,alsa-lib) - ("jemalloc" ,jemalloc) - ("jdk17" ,openjdk17 "jdk") - ("jdk25" ,openjdk25 "jdk"))) - (home-page "https://prismlauncher.org/") - (synopsis "Free, open source launcher for Minecraft") - (description - "Allows you to have multiple, separate instances of Minecraft (each with -their own mods, texture packs, saves, etc), and helps you manage them and -their associated options with a simple interface.") - (license (list license:gpl3 ; PolyMC, launcher - license:expat ; MinGW runtime, lionshead, tomlc99 - license:lgpl3 ; Qt 5/6 - license:lgpl3+ ; libnbt++ - license:lgpl2.1+ ; rainbow (KGuiAddons) - license:isc ; Hoedown - license:silofl1.1 ; Material Design Icons - license:lgpl2.1 ; Quazip - license:public-domain ; xz-minidec, murmur2, xz-embedded - license:bsd-3 ; ColumnResizer, O2 (Katabasis fork), - ; gamemode, localpeer - license:asl2.0 ; classparser, systeminfo - ;; Batch icon set: - (non-license:nonfree "file://COPYING.md"))))) diff --git a/epistemia/packages/suckless.scm b/epistemia/packages/suckless.scm @@ -1,95 +0,0 @@ -(define-module (epistemia packages suckless) - #:use-module (gnu packages fontutils) - #:use-module (gnu packages ncurses) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages xorg) - #:use-module (guix build-system gnu) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix utils) - #:export (vin-dwm)) - -(define-public vin-dwm - (package - (name "vin-dwm") - (version "6.5") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "/data/src/private/suckless/dwm") - (commit "904dc786815d3530f76e62ba3af4736e83370870"))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1q07dnw33zr14nnih4ldx1aqmg5dxvp8fvj3qa0fi3qy312pfhfg")))) - (build-system gnu-build-system) - (arguments - `(#:tests? #f - #:make-flags (list (string-append "FREETYPEINC=" - (assoc-ref %build-inputs "freetype") - "/include/freetype2")) - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda _ - (substitute* "Makefile" (("\\$\\{CC\\}") "gcc")) - #t)) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (invoke "make" "install" - (string-append "DESTDIR=" out) "PREFIX="))))))) - (inputs - (list freetype libx11 libxft libxinerama)) - (home-page "https://dwm.suckless.org/") - (synopsis "Dynamic window manager") - (description - "dwm is a dynamic window manager for X. It manages windows in tiled, -monocle and floating layouts. All of the layouts can be applied dynamically, -optimising the environment for the application in use and the task performed.") - (license license:x11))) - -(define-public vin-st - (package - (name "vin-st") - (version "0.9.2") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "/data/src/private/suckless/st") - (commit "0b6ef824637c77e00b26369bfe77c3e3311f7eed"))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0ylqaarkkrqx26aiqcz4nhp68k6dmrqbhn7knx10d9j7v1vpjcnh")))) - (build-system gnu-build-system) - (arguments - `(#:tests? #f ; no tests - #:make-flags - (list (string-append "CC=" ,(cc-for-target)) - (string-append "TERMINFO=" - (assoc-ref %outputs "out") - "/share/terminfo") - (string-append "PREFIX=" %output)) - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (inputs - `(("libx11" ,libx11) - ("libxft" ,libxft) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype))) - (native-inputs - (list ncurses ;provides tic program - pkg-config)) - (home-page "https://st.suckless.org/") - (synopsis "Simple terminal emulator") - (description - "St implements a simple and lightweight terminal emulator. It -implements 256 colors, most VT10X escape sequences, utf8, X11 copy/paste, -antialiased fonts (using fontconfig), fallback fonts, resizing, and line -drawing.") - (license (list license:x11 - license:expat)))) diff --git a/epistemia/packages/xorg.scm b/epistemia/packages/xorg.scm @@ -1,69 +0,0 @@ -(define-module (epistemia packages xorg) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (gnu packages xdisorg) - #:use-module (gnu packages xorg)) - -(define-public xorg-server-with-drivers - (package - (inherit xorg-server) - (name "xorg-server-with-drivers") - (arguments - (substitute-keyword-arguments (package-arguments xorg-server) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'install 'install-modules-conf - (lambda _ - ;; Add Xorg module paths so drivers in inputs are found. - (call-with-output-file - (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") - (lambda (port) - (display - (string-append - "Section \"Files\"\nModulePath \"" - #$output "/lib/xorg/modules," - #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," - #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules," - #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" - "EndSection\n") - port))) - (call-with-output-file - (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") - (lambda (port) - (display - (string-append - "Section \"InputClass\"\n" - " Identifier \"keyboards\"\n" - " MatchIsKeyboard \"on\"\n" - " Driver \"libinput\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"mice\"\n" - " MatchIsPointer \"on\"\n" - " Driver \"libinput\"\n" - " Option \"AccelProfile\" \"flat\"\n" - " Option \"AccelSpeed\" \"0\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"touchpads\"\n" - " MatchIsTouchpad \"on\"\n" - " Driver \"libinput\"\n" - " Option \"AccelProfile\" \"flat\"\n" - " Option \"AccelSpeed\" \"0\"\n" - " Option \"Tapping\" \"on\"\n" - " Option \"TappingButtonMap\" \"lrm\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"wacom\"\n" - " MatchProduct \"Wacom\"\n" - " Driver \"wacom\"\n" - "EndSection\n") - port))))))))) - (inputs (modify-inputs (package-inputs xorg-server) - (append xf86-input-libinput - xf86-input-wacom - xf86-video-amdgpu))))) diff --git a/epistemia/packages/zfs.scm b/epistemia/packages/zfs.scm @@ -1,15 +0,0 @@ -(define-module (epistemia packages zfs) - #:use-module (guix packages) - #:use-module (guix download) ;; Needed for url-fetch - #:use-module (guix utils) ;; Needed for substitute-keyword-arguments - #:use-module (gnu packages file-systems) - #:use-module (nongnu packages linux) - #:export (zfs-linux)) - -(define-public zfs-linux - (package - (inherit zfs) - (name "zfs-linux") - (arguments - (substitute-keyword-arguments (package-arguments zfs) - ((#:linux _ #f) linux-6.18))))) diff --git a/epistemia/secrets/wg0psk_demiurge.age b/epistemia/secrets/wg0psk_demiurge.age Binary files differ. diff --git a/epistemia/secrets/wg0psk_hastur.age b/epistemia/secrets/wg0psk_hastur.age Binary files differ. diff --git a/epistemia/services/age-secret.scm b/epistemia/services/age-secret.scm @@ -1,97 +0,0 @@ -(define-module (epistemia services age-secret) - #:use-module (guix gexp) - #:use-module (guix records) - #:use-module (gnu services) - #:use-module (gnu services shepherd) - #:use-module (gnu packages golang-crypto) - #:use-module (ice-9 match) - #:export (age-secret-service-type - age-secret-configuration - age-secret)) - -(define-record-type* <age-secret-configuration> - age-secret-configuration make-age-secret-configuration - age-secret-configuration? - (secrets age-secret-configuration-secrets - (default '()))) - -(define-record-type* <age-secret> - age-secret make-age-secret - age-secret? - (file age-secret-file) - (name age-secret-name) - (owner age-secret-owner (default "root")) - (group age-secret-group (default "root")) - (mode age-secret-mode (default #o400))) - -(define (age-secret-activation config) - (let ((secrets (age-secret-configuration-secrets config))) - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils) - (ice-9 match) - (ice-9 format)) - - ;; TODO: make the let vars configurable if I ever upstream this - (let ((secret-dir "/run/secrets") - (key-path "/etc/ssh/ssh_host_ed25519_key") - (age-bin #$(file-append age "/bin/age"))) - - (mkdir-p secret-dir) - (chmod secret-dir #o711) - - (for-each - (match-lambda - ((source output-name owner-name group-name mode) - (let ((dest (string-append secret-dir "/" output-name))) - ;; decrypt if missing - (unless (file-exists? dest) - (if (file-exists? key-path) - (begin - (format #t "Decrypting secret: ~a -> ~a...~%" source dest) - (let ((status (system* age-bin "-d" "-i" key-path "-o" dest source))) - (unless (zero? status) - (format (current-error-port) "Failed to decrypt ~a.~%" output-name)))) - (format (current-error-port) "Missing host key: ~a~%" key-path))) - - ;; apply permissions and ownership - (when (file-exists? dest) - (catch 'system-error - (lambda () - (let ((uid (passwd:uid (getpwnam owner-name))) - (gid (group:gid (getgrnam group-name)))) - (chown dest uid gid) - (chmod dest mode))) - (lambda args - (format (current-error-port) - "Failed to set owner ~a:~a on ~a: ~a~%" - owner-name group-name dest (strerror (system-error-errno args))))))))) - - ;; serialize record list for gexp - '#$(map (lambda (s) - (list (age-secret-file s) - (age-secret-name s) - (age-secret-owner s) - (age-secret-group s) - (age-secret-mode s))) - secrets))))))) - -(define (age-secret-shepherd-service config) - (list (shepherd-service - (provision '(age-secret)) - (requirement '()) - (one-shot? #t) - (start #~(lambda () #t)) - (documentation "Age secret decryption marker service.")))) - -(define age-secret-service-type - (service-type - (name 'age-secret) - (extensions - (list (service-extension activation-service-type - age-secret-activation) - (service-extension shepherd-root-service-type - age-secret-shepherd-service))) - (description - "Decrypts age-encrypted files at boot using host keys and assigns ownership.") - (default-value (age-secret-configuration)))) diff --git a/epistemia/services/machine-learning.scm b/epistemia/services/machine-learning.scm @@ -1,61 +0,0 @@ -(define-module (epistemia services machine-learning) - #:use-module (gnu packages admin) - #:use-module (gnu services) - #:use-module (gnu services shepherd) - #:use-module (gnu system shadow) - #:use-module (guix gexp) - #:use-module (guix records) - #:export (llama-swap-configuration - llama-swap-configuration? - llama-swap-service-type)) - -(define-record-type* <llm-router-configuration> - llm-router-configuration make-llm-router-configuration - llm-router-configuration? - (package llm-router-configuration-package - (default llm-router)) - (llama-cpp llm-router-configuration-llama-cpp - (default llama-cpp)) - (config llm-router-configuration-config) - (listen llm-router-configuration-listen - (default ":8080")) - (watch-config? llm-router-configuration-watch-config? - (default #f))) - -(define llm-router-account-service - (list (user-account - (name "llm-router") - (group "nogroup") - (system? #t) - (comment "llm-router daemon user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin"))))) - -(define (llm-router-shepherd-service config) - (let ((pkg (llm-router-configuration-package config)) - (lcpp (llm-router-configuration-llama-cpp config)) - (cfg (llm-router-configuration-config config))) - (list - (shepherd-service - (documentation "llm-router OpenAI-compatible model proxy") - (provision '(llm-router)) - (requirement '(networking)) - (start #~(make-forkexec-constructor - (append - (list #$(file-append pkg "/bin/llm-router"))) - #:user "llm-router" - #:environment-variables - (cons (string-append "PATH=" #$(file-append lcpp "/bin")) - (default-environment-variables)))) - (stop #~(make-kill-destructor)))))) - -(define llm-router-service-type - (service-type (name 'llm-router) - (extensions - (list (service-extension account-service-type - (const llm-router-account-service)) - (service-extension shepherd-root-service-type - llm-router-shepherd-service))) - (description - "llm-router is a proxy to OpenAI-compatible and SDAPI-compatible API -servers."))) diff --git a/epistemia/services/zfs.scm b/epistemia/services/zfs.scm @@ -1,40 +0,0 @@ -(define-module (epistemia services zfs) - #:use-module (gnu services shepherd) - #:use-module (guix gexp) - #:use-module (epistemia packages zfs) - #:export (zfs-shepherd-services)) - -;; from raid5atemyhomework's valiant efforts -(define zfs-shepherd-services - (let ((zpool (file-append zfs-linux "/sbin/zpool")) - (zfs (file-append zfs-linux "/sbin/zfs")) - (scheme-modules `((srfi srfi-1) - (srfi srfi-34) - (srfi srfi-35) - (rnrs io ports) - ,@%default-modules))) - (define zfs-scan - (shepherd-service - (provision '(zfs-scan)) - (documentation "Scans for ZFS pools.") - (requirement '(kernel-module-loader udev)) - (modules scheme-modules) - (start #~(lambda _ - (invoke/quiet #$zpool "import" "-a" "-N" "-d" "/dev/disk/by-id"))) - (stop #~(const #f)))) - (define zfs-automount - (shepherd-service - (provision '(zfs-automount)) - (documentation "Automounts ZFS data sets.") - (requirement '(zfs-scan)) - (modules scheme-modules) - (start #~(lambda _ - (with-output-to-port - (current-error-port) - (lambda () - (invoke #$zfs "mount" "-a" "-l"))))) - (stop #~(lambda _ - (chdir "/") - (invoke/quiet #$zfs "unmount" "-a" "-f") - #f)))) - (list zfs-scan zfs-automount)))