update opencode to more recent version with overlay
This commit is contained in:
parent
78757b8fdb
commit
5eadff9ccd
7 changed files with 117 additions and 50 deletions
32
common/programs/opencode.nix
Normal file
32
common/programs/opencode.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"programs"
|
||||
"opencode"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
||||
in
|
||||
{
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "opencode";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable ({
|
||||
environment.systemPackages = with pkgs; [
|
||||
opencode
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
"oc" = "all_proxy='' http_proxy='' https_proxy='' opencode";
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue