mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Use the shared DAG-aware JSON generator for programs.opencode.settings so order-sensitive permission rules can be expressed with lib.hm.dag entries. Add a focused NMT test for last-match-wins permission output and news for existing opencode users.
19 lines
407 B
Nix
19 lines
407 B
Nix
{ lib, ... }:
|
|
{
|
|
programs.opencode = {
|
|
enable = true;
|
|
settings = {
|
|
permission.bash = {
|
|
"aa *" = lib.hm.dag.entryAfter [ "zz *" ] "allow";
|
|
"zz *" = "ask";
|
|
};
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/opencode/opencode.json
|
|
assertFileContent home-files/.config/opencode/opencode.json \
|
|
${./settings-ordered-permissions.json}
|
|
'';
|
|
}
|