From 1860fa6dcb4168fa9be87851315d424aa1199b40 Mon Sep 17 00:00:00 2001 From: Hari <73809867+harivansh-afk@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:52:46 -0400 Subject: [PATCH] add declerative devin conf (#39) --- config/devin/config.json | 9 +++++++++ home/common.nix | 1 + home/devin.nix | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 config/devin/config.json create mode 100644 home/devin.nix 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}" + ''; +}