changes to move opencode to nixpkgs unstable - more up to date and fixes breaking bugs
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
in {
|
||||
imports = modules;
|
||||
environment.systemPackages = with pkgs; [
|
||||
opencode
|
||||
# nixos-26.05 ships 1.15.10 and opencode releases several times a week,
|
||||
# so it is pinned to unstable. See modules/system/core/overlays.nix.
|
||||
unstable.opencode
|
||||
devenv
|
||||
jellyfin-tui
|
||||
];
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
};
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
# Escape hatch for packages that move faster than the stable channel.
|
||||
# Consumed only through the `unstable` overlay, see modules/system/core/overlays.nix.
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
user
|
||||
bootloader
|
||||
nix
|
||||
overlays
|
||||
hardware
|
||||
locale
|
||||
nix-ld
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# Escape hatch for packages that move faster than the stable channel.
|
||||
#
|
||||
# `pkgs.unstable.<name>` resolves against nixos-unstable while the rest of the
|
||||
# system stays on nixos-26.05. Keep the number of consumers small and prefer
|
||||
# stable unless there is a concrete reason; every unstable package drags a bit
|
||||
# of the unstable closure (glibc, stdenv) in alongside the stable one.
|
||||
#
|
||||
# Bump with `nix flake update nixpkgs-unstable`.
|
||||
flake.overlays.unstable = _final: prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (prev.stdenv.hostPlatform) system;
|
||||
# Carries allowUnfree (set in nix-settings.nix) into the unstable set.
|
||||
inherit (prev) config;
|
||||
};
|
||||
};
|
||||
|
||||
# This flake has two independent `pkgs` instances, and the overlay has to be
|
||||
# registered on both or `pkgs.unstable` would exist in some modules only:
|
||||
#
|
||||
# 1. the NixOS module system's `pkgs` - plain modules such as
|
||||
# modules/features/bun, modules/system/core
|
||||
# 2. flake-parts' perSystem `pkgs` - modules built with `moduleWithSystem`,
|
||||
# such as modules/attrs/development, which ignore `nixpkgs.overlays`
|
||||
flake.nixosModules.overlays = {...}: {
|
||||
nixpkgs.overlays = [self.overlays.unstable];
|
||||
};
|
||||
|
||||
perSystem = {system, ...}: {
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.unstable];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user