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
29
common/flake.lock
generated
29
common/flake.lock
generated
|
|
@ -85,11 +85,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749154018,
|
||||
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
|
||||
"lastModified": 1750792728,
|
||||
"narHash": "sha256-Lh3dopA8DdY+ZoaAJPrtkZOZaFEJGSYjOdAYYgOPgE4=",
|
||||
"owner": "rycee",
|
||||
"repo": "home-manager",
|
||||
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
|
||||
"rev": "366f00797b1efb70f2882d3da485e3c10fd3d557",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -139,11 +139,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1749024892,
|
||||
"narHash": "sha256-OGcDEz60TXQC+gVz5sdtgGJdKVYr6rwdzQKuZAJQpCA=",
|
||||
"lastModified": 1750622754,
|
||||
"narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8f1b52b04f2cb6e5ead50bd28d76528a2f0380ef",
|
||||
"rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -169,6 +169,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_opencode": {
|
||||
"locked": {
|
||||
"lastModified": 1751351490,
|
||||
"narHash": "sha256-ctx8/MHA43rXv7R7aLIi2K/yQDusChswqTm1ngHis0A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7aeaddc3ad9186427b3ffea49dd36b5893993e2d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "pull/419604/head",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ragenix": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
|
|
@ -195,6 +211,7 @@
|
|||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs_opencode": "nixpkgs_opencode",
|
||||
"ragenix": "ragenix"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
home-manager.url = "github:rycee/home-manager/release-25.05";
|
||||
ragenix.url = "github:yaxitech/ragenix";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
|
||||
nixpkgs_opencode.url = "github:nixos/nixpkgs/pull/419604/head";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -11,6 +13,7 @@
|
|||
home-manager,
|
||||
ragenix,
|
||||
nix-flatpak,
|
||||
nixpkgs_opencode,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
|
@ -23,6 +26,16 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
opencode = nixpkgs_opencode.legacyPackages.${prev.system}.opencode;
|
||||
})
|
||||
];
|
||||
}
|
||||
)
|
||||
home-manager.nixosModules.home-manager
|
||||
ragenix.nixosModules.age
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
|
|
@ -36,6 +49,7 @@
|
|||
./secrets
|
||||
];
|
||||
config = {
|
||||
|
||||
_module.args = {
|
||||
inherit ragenix;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ in
|
|||
./podman.nix
|
||||
./incus.nix
|
||||
./flatpaks.nix
|
||||
./opencode.nix
|
||||
];
|
||||
config = {
|
||||
assertions = [
|
||||
|
|
|
|||
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