infrastructure/bootstrap.nix

34 lines
755 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
# SPDX-FileContributor: Maurice Debray <maurice.debray@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
let
2025-02-06 09:42:07 +01:00
unpatchedSources = import ./npins;
2025-02-06 09:42:07 +01:00
pkgs = import unpatchedSources.nixos-unstable { };
patch = (import ./lib/nix-patches { patchFile = ./patches; }).base {
2025-02-06 09:42:07 +01:00
inherit pkgs;
};
2025-02-06 09:42:07 +01:00
sources = builtins.mapAttrs (
k: src:
patch.applyPatches {
inherit src;
name = k;
}
2025-02-06 09:42:07 +01:00
) unpatchedSources;
2025-01-09 14:52:51 +01:00
2025-02-06 09:42:07 +01:00
overlays.lib = _: lib: { extra = import ./lib/nix-lib { inherit lib; }; };
2025-01-09 14:52:51 +01:00
in
2025-02-06 09:42:07 +01:00
{
inherit overlays sources unpatchedSources;
2025-01-09 14:52:51 +01:00
2025-02-06 09:42:07 +01:00
pkgs = pkgs // {
lib = pkgs.lib.extend overlays.lib;
};
2025-01-09 14:52:51 +01:00
}