add declerative devin conf

This commit is contained in:
Harivansh Rathi 2026-04-02 16:50:34 -04:00
parent 029ad0af21
commit 589b9a7ddd
3 changed files with 36 additions and 0 deletions

9
config/devin/config.json Normal file
View file

@ -0,0 +1,9 @@
{
"shell": {
"setup_complete": true
},
"theme_mode": "dark",
"agent": {
"model": "gpt-5-4-xhigh-priority"
}
}

View file

@ -7,6 +7,7 @@
./bat.nix ./bat.nix
./eza.nix ./eza.nix
./claude.nix ./claude.nix
./devin.nix
./xdg.nix ./xdg.nix
./security.nix ./security.nix
./codex.nix ./codex.nix

26
home/devin.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}:
let
sourceFile = ../config/devin/config.json;
targetDir = "${config.xdg.configHome}/devin";
targetFile = "${targetDir}/config.json";
bin = "${pkgs.coreutils}/bin";
in
{
# Devin rewrites this file when settings change, so seed a mutable copy
# instead of pointing the path at the read-only Nix store.
home.activation.installDevinConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
${bin}/mkdir -p "${targetDir}"
if [ -f "${targetFile}" ] && ! ${bin}/cmp -s "${sourceFile}" "${targetFile}"; then
timestamp="$(${bin}/date +%Y%m%d%H%M%S)"
${bin}/cp "${targetFile}" "${targetFile}.hm-bak.$timestamp"
fi
${bin}/install -m 600 "${sourceFile}" "${targetFile}"
'';
}