mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 09:01:16 +00:00
add declerative devin conf
This commit is contained in:
parent
029ad0af21
commit
589b9a7ddd
3 changed files with 36 additions and 0 deletions
9
config/devin/config.json
Normal file
9
config/devin/config.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"shell": {
|
||||||
|
"setup_complete": true
|
||||||
|
},
|
||||||
|
"theme_mode": "dark",
|
||||||
|
"agent": {
|
||||||
|
"model": "gpt-5-4-xhigh-priority"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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
26
home/devin.nix
Normal 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}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue