diff --git a/config/devin/config.json b/config/devin/config.json new file mode 100644 index 0000000..66ea982 --- /dev/null +++ b/config/devin/config.json @@ -0,0 +1,9 @@ +{ + "shell": { + "setup_complete": true + }, + "theme_mode": "dark", + "agent": { + "model": "gpt-5-4-xhigh-priority" + } +} diff --git a/home/common.nix b/home/common.nix index 0fac942..1edd08e 100644 --- a/home/common.nix +++ b/home/common.nix @@ -7,6 +7,7 @@ ./bat.nix ./eza.nix ./claude.nix + ./devin.nix ./xdg.nix ./security.nix ./codex.nix diff --git a/home/devin.nix b/home/devin.nix new file mode 100644 index 0000000..af5639f --- /dev/null +++ b/home/devin.nix @@ -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}" + ''; +}