From 841132185c4c3aafe0c7a522e5d9d5ed822d1f8d Mon Sep 17 00:00:00 2001 From: GarandPLG Date: Sun, 18 Oct 2026 16:34:18 +0200 Subject: [PATCH] Enable ChatGPT and restructure Codex module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Set `chatgpt.enable = true` for both Garand‑Desktop and Garand‑Laptop. - Rename `modules/home/codex.nix` to `modules/home/codex/default.nix`. - Add `mutableSettings = true` and import `plugins.nix` in the Codex module. - Introduce `modules/home/codex/plugins.nix` defining Codex plugins and marketplaces. - Update `modules/home/default.nix` to import the new Codex directory. - Refresh ChatGPT desktop entry icon SHA256 hash. --- hosts/Garand-Desktop/home-modules.nix | 2 +- hosts/Garand-Laptop/home-modules.nix | 2 +- modules/home/{codex.nix => codex/default.nix} | 9 ++-- modules/home/codex/plugins.nix | 48 +++++++++++++++++++ modules/home/default.nix | 2 +- modules/home/xdg/desktop-entries.nix | 2 +- 6 files changed, 57 insertions(+), 8 deletions(-) rename modules/home/{codex.nix => codex/default.nix} (57%) create mode 100644 modules/home/codex/plugins.nix diff --git a/hosts/Garand-Desktop/home-modules.nix b/hosts/Garand-Desktop/home-modules.nix index 9dbd130..30edf50 100644 --- a/hosts/Garand-Desktop/home-modules.nix +++ b/hosts/Garand-Desktop/home-modules.nix @@ -73,7 +73,7 @@ _: { messenger.enable = true; # Messenger: Facebook Messenger mastodon.enable = true; # Mastodon: a decentralized social network garandcloud.enable = true; # GarandCloud: my Nextcloud instance - chatgpt.enable = false; # ChatGPT: a large language model + chatgpt.enable = true; # ChatGPT: a large language model claude.enable = true; # Claude: a large language model glance.enable = true; # Glance: my home server dashboard jellyfinClient.enable = true; # Jellyfin: My Jellyfin diff --git a/hosts/Garand-Laptop/home-modules.nix b/hosts/Garand-Laptop/home-modules.nix index d71adc6..0509041 100644 --- a/hosts/Garand-Laptop/home-modules.nix +++ b/hosts/Garand-Laptop/home-modules.nix @@ -73,7 +73,7 @@ _: { messenger.enable = true; # Messenger: Facebook Messenger mastodon.enable = true; # Mastodon: a decentralized social network garandcloud.enable = true; # GarandCloud: my Nextcloud instance - chatgpt.enable = false; # ChatGPT: a large language model + chatgpt.enable = true; # ChatGPT: a large language model claude.enable = true; # Claude: a large language model glance.enable = true; # Glance: my home server dashboard jellyfinClient.enable = true; # Jellyfin: My Jellyfin diff --git a/modules/home/codex.nix b/modules/home/codex/default.nix similarity index 57% rename from modules/home/codex.nix rename to modules/home/codex/default.nix index da6f020..778250f 100644 --- a/modules/home/codex.nix +++ b/modules/home/codex/default.nix @@ -9,9 +9,10 @@ config.programs.codex = lib.mkIf config.codex.enable { enable = true; package = pkgs.codex; - # skills = { - # ponytail = /home/${username}/.agents/skills/ponytail; - # caveman = /home/${username}/.agents/skills/caveman; - # }; + mutableSettings = true; }; + + imports = [ + ./plugins.nix + ]; } diff --git a/modules/home/codex/plugins.nix b/modules/home/codex/plugins.nix new file mode 100644 index 0000000..ac4754a --- /dev/null +++ b/modules/home/codex/plugins.nix @@ -0,0 +1,48 @@ +{pkgs, ...}: let + ponytail = pkgs.fetchFromGitHub { + name = "ponytail"; + owner = "DietrichGebert"; + repo = "ponytail"; + tag = "v5.3.2"; + sha256 = "sha256-IJlhfkdXI6pMZZCZO7XBRg88LBiNfzc5Gnm4ofGybL8="; + }; + + context-mode = pkgs.fetchFromGitHub { + name = "context-mode"; + owner = "mksglu"; + repo = "context-mode"; + tag = "v1.0.169"; + sha256 = "sha256-1pV56ZB2aqod+C0kb5myuiWLAJ7+opiaurwZZ3BGKYk="; + }; + + understand-anything-src = pkgs.fetchFromGitHub { + name = "understand-anything"; + owner = "Egonex-AI"; + repo = "Understand-Anything"; + tag = "v2.9.0"; + sha256 = "sha256-nECfbp0vyFZRZX0Zg2s4ga/kYSCihJxYt9lxUHLGmFA="; + }; + + understand-anything = + pkgs.runCommand "understand-anything" { + version = "2.9.0"; + nativeBuildInputs = [pkgs.jq]; + } '' + mkdir -p "$out" + cp -r ${understand-anything-src}/understand-anything-plugin/. "$out/" + mkdir -p "$out/.codex-plugin" + jq '. + {skills: "./skills/", hooks: "./hooks/hooks.json"}' \ + "$out/.claude-plugin/plugin.json" > "$out/.codex-plugin/plugin.json" + test -f "$out/skills/understand/SKILL.md" + test -f "$out/hooks/hooks.json" + ''; +in { + programs.codex = { + plugins = [ponytail understand-anything context-mode]; + marketplaces = { + ponytail = ponytail; + Understand-Anything = understand-anything-src; + context-mode = context-mode; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index 57b5654..763a220 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -2,6 +2,7 @@ _: { imports = [ ./bash ./chromium + ./codex ./fastfetch ./fish ./hyprland @@ -19,7 +20,6 @@ _: { ./btop.nix ./cargo.nix ./cava.nix - ./codex.nix ./easyeffects.nix ./eza.nix ./fzf.nix diff --git a/modules/home/xdg/desktop-entries.nix b/modules/home/xdg/desktop-entries.nix index 0e0a67a..811dadb 100644 --- a/modules/home/xdg/desktop-entries.nix +++ b/modules/home/xdg/desktop-entries.nix @@ -46,7 +46,7 @@ displayName = "ChatGPT"; url = "https://chatgpt.com/"; iconUrl = "https://static.vecteezy.com/system/resources/previews/031/110/149/large_2x/chatgpt-logo-transparent-free-png.png"; - iconSha = "sha256-ZWmhchblQkksW02eduVrkUSPAlWPGC2fjqxrAGAF5jw="; + iconSha = "sha256-WXR/d28ynaBe+kZpnkUAaHcriDVSge98weS5Dza+AvQ="; } { name = "claude";