use nixpkgs input and ocaml overlay

This commit is contained in:
atagen 2024-12-12 12:31:04 +11:00 committed by atagen
parent 4490c67de9
commit 4bc3176ce6
2 changed files with 45 additions and 25 deletions

View file

@ -1,6 +1,8 @@
{
inputs = {
nixpkgs-oc.url = "github:nix-ocaml/nix-overlays";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
ocaml-overlay.url = "github:nix-ocaml/nix-overlays";
flake-utils.url = "github:numtide/flake-utils";
@ -13,7 +15,7 @@
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs-oc";
inputs.nixpkgs.follows = "ocaml-overlay";
inputs.lix.follows = "lix";
};
};
@ -25,11 +27,12 @@
outputs = inputs @ {
self,
nixpkgs-oc,
nixpkgs,
ocaml-overlay,
flake-utils,
...
}: let
inherit (inputs) nixpkgs-oc;
inherit (inputs) ocaml-overlay;
lix-overlay = inputs.lix-module.overlays.default;
lix-module = inputs.lix-module.nixosModules.default;
nh-overlay = inputs.nh.overlays.default;
@ -37,12 +40,12 @@
in
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs-oc {
pkgs = import nixpkgs {
inherit system;
overlays = [
lix-overlay
nh-overlay
nixpkgs-oc.overlays.default
ocaml-overlay.overlays.default
];
modules = [lix-module];
extra-substituters = "https://anmonteiro.nix-cache.workers.dev";
@ -114,7 +117,7 @@
// {
nixosModules.meat = import ./nix/module.nix {
meatOverlays = [
nixpkgs-oc.overlays.default
ocaml-overlay.overlays.default
nh-overlay
self.overlays.meat
];