From a1b3abb94210581fb7e4d983570e10b7a4c6034d Mon Sep 17 00:00:00 2001 From: pablu Date: Sun, 27 Sep 2026 15:06:33 +0200 Subject: change gnupg ssh agent, to openssh ssh agent, update codex config for newest version, update nvim --- codex/config.toml | 54 ++++++++++++++++------ dot_config/hypr/config/autostart.lua | 1 + .../hypr/scripts/executable_ssh-agent-session | 24 ++++++++++ dot_config/nvim/lazy-lock.json | 46 +++++++++--------- dot_config/nvim/lua/plugins/conform.lua | 2 +- dot_gnupg/private_gpg-agent.conf | 9 ---- dot_zshrc.tmpl | 8 ++-- 7 files changed, 94 insertions(+), 50 deletions(-) create mode 100644 dot_config/hypr/scripts/executable_ssh-agent-session delete mode 100644 dot_gnupg/private_gpg-agent.conf diff --git a/codex/config.toml b/codex/config.toml index ff7a423..5968e92 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -1,31 +1,59 @@ -model = "gpt-5.6-terra" +model = "gpt-5.6-sol" model_reasoning_effort = "medium" -approval_request = "on-request" +approval_policy = "on-request" sandbox_mode = "read-only" model_verbosity = "low" web_search = "cached" allow_login_shell = false developer_instructions = """ -All manual filesystem modifications must use Codex's apply_patch mechanism. +Default to explanation, discussion, diagnosis, and review. -Never create, modify, rename, or delete project files using Python, Python scripts, -shell redirection, heredocs, sed -i, perl, awk, tee, dd, cat, printf, or another -general-purpose command. +Treat requests to explain, discuss, review, diagnose, assess, compare, +investigate, plan, or suggest as read-only. A question about what could or +should be changed does not authorize making that change. + +Do not modify, create, rename, delete, or generate project files unless the +user's current request explicitly asks you to make those changes. Permission +to inspect files, run tests, reproduce a problem, or recommend improvements is +not permission to implement anything. + +Do not ask whether the user wants you to implement, patch, edit, or apply your +recommendations after a discussion-only request. Provide the requested +explanation or recommendation and stop. + +Do not draft a patch or replacement implementation unless explicitly +requested. Small illustrative examples or pseudocode are allowed when they +materially help an explanation. + +If the user's intent is ambiguous, remain read-only and answer as much as +possible without changing files. Ask for clarification only when the requested +outcome cannot be completed without a material choice from the user. + +Authorization to edit applies only to the current request and its stated scope. +Do not carry editing authorization into later requests. + +When, and only when, the user's current request explicitly authorizes file +changes, all manual filesystem modifications must use Codex's apply_patch +mechanism. + +Never create, modify, rename, or delete project files using Python, Python +scripts, shell redirection, heredocs, sed -i, perl, awk, tee, dd, cat, printf, +or another general-purpose command. Do not use a shell or programming-language interpreter as a workaround for apply_patch. -If apply_patch cannot perform a requested edit, stop and explain the problem +If apply_patch cannot perform an authorized edit, stop and explain the problem instead of using another mechanism to modify the filesystem. -The purpose of this rule is that every manual code change must be presented as -a reviewable file patch/diff before it is applied. +The purpose of this rule is that every authorized manual code change must be +presented as a reviewable file patch or diff before it is applied. -Commands whose purpose is to generate files as their normal operation, such as -formatters, compilers, code generators, or package managers, are exempt when -the user has authorized running that command. +Commands whose normal purpose is to generate files, such as formatters, +compilers, code generators, or package managers, are exempt from the +apply_patch requirement only when the user has authorized running that command. """ [shell_environment_policy] @@ -37,7 +65,7 @@ multi_agent = false # shell_snapshot = false # shell_tool = false memories = true -deafult_mode_request_user_input = true +deafault_mode_request_user_input = true code_mode_host = true [tui] diff --git a/dot_config/hypr/config/autostart.lua b/dot_config/hypr/config/autostart.lua index d902fc9..ae8522e 100644 --- a/dot_config/hypr/config/autostart.lua +++ b/dot_config/hypr/config/autostart.lua @@ -1,4 +1,5 @@ hl.on("hyprland.start", function() + hl.exec_cmd("~/.config/hypr/scripts/ssh-agent-session") hl.exec_cmd("awww-daemon") hl.exec_cmd("awww restore") hl.exec_cmd("gentoo-pipewire-launcher") diff --git a/dot_config/hypr/scripts/executable_ssh-agent-session b/dot_config/hypr/scripts/executable_ssh-agent-session new file mode 100644 index 0000000..6a05ba8 --- /dev/null +++ b/dot_config/hypr/scripts/executable_ssh-agent-session @@ -0,0 +1,24 @@ + #!/bin/sh + + agent_socket="${XDG_RUNTIME_DIR:?XDG_RUNTIME_DIR is not set}/ssh-agent.sock" + + SSH_AUTH_SOCK="$agent_socket" /usr/bin/ssh-add -l >/dev/null 2>&1 + agent_status=$? + + case "$agent_status" in + 0|1) + # Agent exists; status 1 only means it currently has no keys. + exit 0 + ;; + 2) + # No reachable agent. Remove only its stale runtime socket. + rm -f -- "$agent_socket" + exec /usr/bin/ssh-agent \ + -D \ + -a "$agent_socket" \ + -t 8h + ;; + *) + exit "$agent_status" + ;; + esac diff --git a/dot_config/nvim/lazy-lock.json b/dot_config/nvim/lazy-lock.json index 0db6bd0..766ca0e 100644 --- a/dot_config/nvim/lazy-lock.json +++ b/dot_config/nvim/lazy-lock.json @@ -1,38 +1,38 @@ { "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "autoclose.nvim": { "branch": "main", "commit": "bafd0368716216fa6a7bb2a43ecd889b44efdb46" }, + "autoclose.nvim": { "branch": "main", "commit": "bcad8e84d9cd78ba73433cb396b68e489af11e31" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, - "catppuccin": { "branch": "main", "commit": "0303a7208dba448c459767486a38a6ec05c4216b" }, - "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, - "fidget.nvim": { "branch": "main", "commit": "82404b196e73a00b1727a91903beef5ddc319d22" }, - "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "herdr-splits.nvim": { "branch": "main", "commit": "107273e004e4f7ef07f13c83164d2cb2c51df65d" }, + "catppuccin": { "branch": "main", "commit": "edefef779ab08ce1a4a404713e3012b0d202bd35" }, + "conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" }, + "fidget.nvim": { "branch": "main", "commit": "9e0201673e08e997e7cf52afca5565c70bd117f3" }, + "flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" }, + "friendly-snippets": { "branch": "main", "commit": "b4d01b0fdf3c9a549961c2f9ffe8dc09be166219" }, + "herdr-splits.nvim": { "branch": "main", "commit": "94f30cf4e9ac76ddf185a3acd0977be728fa4106" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, - "mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" }, - "mini.icons": { "branch": "main", "commit": "520995f1d75da0e4cc901ee95080b1ff2bc46b94" }, - "mini.indentscope": { "branch": "main", "commit": "ad19b1f02223391f3d40440f7ff10607f0043585" }, - "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, + "mini.icons": { "branch": "main", "commit": "f642e3ba8c12afbc8f32f6d77ef6597eac56786f" }, + "mini.indentscope": { "branch": "main", "commit": "92fbaf895f83c59575ec599df532b297ebf62b14" }, + "neotest": { "branch": "master", "commit": "27bf921498043f7ecd821d6db68d05de244bbd02" }, "neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" }, - "neotest-python": { "branch": "master", "commit": "e6df4f1892f6137f58135917db24d1655937d831" }, - "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, - "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, + "neotest-python": { "branch": "master", "commit": "1b56ca4ba51c6014f986d6548ee629bdc95589d1" }, + "nvim-dap": { "branch": "master", "commit": "cfa2d58f4537aca6ca83e2de1a0d9f1491121264" }, + "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, - "nvim-lint": { "branch": "master", "commit": "d48f3a76189d03b2239f6df1b2f7e3fa8353743b" }, - "nvim-lspconfig": { "branch": "master", "commit": "229b79051b380377664edc4cbd534930154921a1" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, - "octo.nvim": { "branch": "master", "commit": "d05b852ad7eba6e34ffe38ee2db430f0fd6f6225" }, + "nvim-lint": { "branch": "master", "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e" }, + "nvim-lspconfig": { "branch": "master", "commit": "046b1a797af1effe8e0474b9af9657a3761ec58a" }, + "nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" }, + "nvim-treesitter": { "branch": "main", "commit": "f603a2f4da48728f80257fb5fbb90145fd1dc173" }, + "nvim-web-devicons": { "branch": "master", "commit": "58447c1fca354bbf184425e4a8d01deecbd6f3c4" }, + "octo.nvim": { "branch": "master", "commit": "af2411604b51cb4a0f3e2de50b1b7cacc2581c48" }, "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "ripgrep": { "branch": "master", "commit": "82313cf95849bfe425109ad9506a52154879b1b1" }, + "ripgrep": { "branch": "master", "commit": "3fce3b5bb0236da2df6d99672afb8a719642eca7" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" }, - "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "680762989e8b05a72e90769959d0fb9a557e6917" }, + "telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "6264451f14119d63a52580e5198d6baf8518b0b2" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/dot_config/nvim/lua/plugins/conform.lua b/dot_config/nvim/lua/plugins/conform.lua index 6386f27..8897903 100644 --- a/dot_config/nvim/lua/plugins/conform.lua +++ b/dot_config/nvim/lua/plugins/conform.lua @@ -6,7 +6,7 @@ return { conform.setup { formatters_by_ft = { lua = { "stylua" }, - python = { "isort", "black", "ruff", lsp_format = "fallback" }, + python = { "isort", "black", "ruff_format", lsp_format = "fallback" }, gotmpl = { "djlint" } }, format_on_save = { diff --git a/dot_gnupg/private_gpg-agent.conf b/dot_gnupg/private_gpg-agent.conf deleted file mode 100644 index 888afb5..0000000 --- a/dot_gnupg/private_gpg-agent.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Use gpg-agent as the single persistent SSH authentication agent. -enable-ssh-support - -# Cache SSH-key passphrases for a working day, but require them again at -# least once every 24 hours. -default-cache-ttl-ssh 28800 -max-cache-ttl-ssh 86400 - -pinentry-program /usr/bin/pinentry diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 489b539..c19d20a 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -48,10 +48,10 @@ alias ls='eza --icons=always' {{ if eq .chezmoi.hostname "gentoo" }} unset SSH_AGENT_PID -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -export GPG_TTY="$(tty)" -gpgconf --launch gpg-agent -gpg-connect-agent updatestartuptty /bye >/dev/null + +if [[ -n ${XDG_RUNTIME_DIR:-} ]]; then + export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.sock" +fi eval "$(mise activate zsh)" -- cgit 1.3.1