mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-09-18 15:51:21 +02:00
fix(agents): merge Codex privacy settings
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
def main [config_file: path, yq: path] {
|
||||
mkdir ($config_file | path dirname)
|
||||
|
||||
if not ($config_file | path exists) {
|
||||
touch $config_file
|
||||
}
|
||||
|
||||
^$yq eval --inplace --input-format toml --output-format toml (
|
||||
'.analytics.enabled = false | ' +
|
||||
'.feedback.enabled = false | ' +
|
||||
'.check_for_update_on_startup = false'
|
||||
) $config_file
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
llm-agents,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configFile = "${config.home.homeDirectory}/.codex/config.toml";
|
||||
in
|
||||
{
|
||||
home.packages = [ llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex ];
|
||||
|
||||
home.activation.configureCodexPrivacy = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
run ${pkgs.nushell}/bin/nu ${./codex-privacy.nu} ${lib.escapeShellArg configFile} ${lib.escapeShellArg "${pkgs.yq-go}/bin/yq"}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
home.sessionVariables.DO_NOT_TRACK = "1";
|
||||
}
|
||||
@@ -1,18 +1,10 @@
|
||||
{ pkgs, llm-agents, ... }:
|
||||
let
|
||||
agentPackages = llm-agents.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
codexNoAnalytics = pkgs.writeShellApplication {
|
||||
name = "codex";
|
||||
text = ''
|
||||
exec ${agentPackages.codex}/bin/codex \
|
||||
--config analytics.enabled=false \
|
||||
--config feedback.enabled=false \
|
||||
--config check_for_update_on_startup=false \
|
||||
"$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ../codex.nix ];
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
@@ -23,7 +15,6 @@ in
|
||||
# AI Agent Tools
|
||||
++ [
|
||||
# Agents
|
||||
codexNoAnalytics
|
||||
agentPackages.opencode
|
||||
agentPackages.kimi-code
|
||||
agentPackages.pi
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
home.sessionVariables = {
|
||||
DO_NOT_TRACK = "1";
|
||||
|
||||
KIMI_DISABLE_TELEMETRY = "1";
|
||||
|
||||
PI_TELEMETRY = "0";
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
imports = [ ../../linux/core.nix ];
|
||||
imports = [
|
||||
../../linux/core.nix
|
||||
../../base/codex.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
{ pkgs, llm-agents, ... }:
|
||||
let
|
||||
agentPackages = llm-agents.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
codexNoAnalytics = pkgs.writeShellApplication {
|
||||
name = "codex";
|
||||
text = ''
|
||||
exec ${agentPackages.codex}/bin/codex \
|
||||
--config analytics.enabled=false \
|
||||
--config feedback.enabled=false \
|
||||
--config check_for_update_on_startup=false \
|
||||
"$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
# https://github.com/Mic92/nix-ld
|
||||
@@ -95,7 +85,6 @@ in
|
||||
# AI Agent Tools
|
||||
++ [
|
||||
# Agents
|
||||
codexNoAnalytics
|
||||
agentPackages.opencode
|
||||
agentPackages.kimi-code
|
||||
agentPackages.pi
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
environment.etc."codex/config.toml".text = ''
|
||||
check_for_update_on_startup = false
|
||||
|
||||
[analytics]
|
||||
enabled = false
|
||||
|
||||
[feedback]
|
||||
enabled = false
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user