forked from DGNum/infrastructure
chore(bootstrap): Rename file
This commit is contained in:
parent
9fe392d4ea
commit
0433a00636
5 changed files with 31 additions and 32 deletions
|
@ -5,34 +5,29 @@
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
let
|
let
|
||||||
rawSources = import ./npins;
|
unpatchedSources = import ./npins;
|
||||||
|
|
||||||
bootstrapNixpkgs = import rawSources.nixos-unstable { };
|
pkgs = import unpatchedSources.nixos-unstable { };
|
||||||
|
|
||||||
patch = (import ./lib/nix-patches { patchFile = ./patches; }).base {
|
patch = (import ./lib/nix-patches { patchFile = ./patches; }).base {
|
||||||
pkgs = bootstrapNixpkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
patchedSources = builtins.mapAttrs (
|
sources = builtins.mapAttrs (
|
||||||
k: src:
|
k: src:
|
||||||
patch.applyPatches {
|
patch.applyPatches {
|
||||||
inherit src;
|
inherit src;
|
||||||
name = k;
|
name = k;
|
||||||
}
|
}
|
||||||
) rawSources;
|
) unpatchedSources;
|
||||||
|
|
||||||
libOverlay = final: _: {
|
overlays.lib = _: lib: { extra = import ./lib/nix-lib { inherit lib; }; };
|
||||||
extra = import ./lib/nix-lib { lib = final; };
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
patchedSources
|
|
||||||
// {
|
|
||||||
|
|
||||||
inherit
|
{
|
||||||
bootstrapNixpkgs
|
inherit overlays sources unpatchedSources;
|
||||||
libOverlay
|
|
||||||
rawSources
|
|
||||||
;
|
|
||||||
|
|
||||||
fullLib = bootstrapNixpkgs.lib.extend libOverlay;
|
pkgs = pkgs // {
|
||||||
|
lib = pkgs.lib.extend overlays.lib;
|
||||||
|
};
|
||||||
}
|
}
|
|
@ -3,9 +3,13 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
|
let
|
||||||
|
bootstrap = import ./bootstrap.nix;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
sources ? import ./sources.nix,
|
sources ? bootstrap.sources,
|
||||||
pkgs ? sources.bootstrapNixpkgs,
|
pkgs ? bootstrap.pkgs,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
9
hive.nix
9
hive.nix
|
@ -9,12 +9,13 @@
|
||||||
let
|
let
|
||||||
### Init some tooling
|
### Init some tooling
|
||||||
|
|
||||||
sources = import ./sources.nix;
|
bootstrap = import ./bootstrap.nix;
|
||||||
|
|
||||||
lib = sources.fullLib;
|
|
||||||
|
|
||||||
|
inherit (bootstrap.pkgs) lib;
|
||||||
inherit (lib.extra) mapSingleFuse;
|
inherit (lib.extra) mapSingleFuse;
|
||||||
|
|
||||||
|
inherit (bootstrap) sources;
|
||||||
|
|
||||||
### Let's build meta
|
### Let's build meta
|
||||||
metadata = (import ./meta) lib;
|
metadata = (import ./meta) lib;
|
||||||
|
|
||||||
|
@ -67,7 +68,7 @@ let
|
||||||
# Function to create arguments based on the node
|
# Function to create arguments based on the node
|
||||||
#
|
#
|
||||||
mkArgs = node: rec {
|
mkArgs = node: rec {
|
||||||
lib = sourcePkgs.lib.extend sources.libOverlay;
|
lib = sourcePkgs.lib.extend bootstrap.overlays.lib;
|
||||||
|
|
||||||
sourcePkgs = nodePkgs node;
|
sourcePkgs = nodePkgs node;
|
||||||
meta = metadata;
|
meta = metadata;
|
||||||
|
|
5
keys.nix
5
keys.nix
|
@ -3,11 +3,10 @@
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
let
|
let
|
||||||
sources = import ./sources.nix;
|
bootstrap = import ./bootstrap.nix;
|
||||||
|
|
||||||
lib = sources.fullLib;
|
inherit (bootstrap.pkgs) lib;
|
||||||
|
|
||||||
meta = (import ../meta lib).config;
|
meta = (import ../meta lib).config;
|
||||||
|
|
||||||
in
|
in
|
||||||
import ./lib/keys { inherit meta lib; }
|
import ./lib/keys { inherit meta lib; }
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
# Nix expression to check if meta module is evaluating correctly.
|
# Nix expression to check if meta module is evaluating correctly.
|
||||||
# To do so run `nix-build ./verify.nix`
|
# To do so run `nix-build ./verify.nix`
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
bootstrap = import ../bootstrap.nix;
|
||||||
pkgs = sources.bootstrapNixpkgs;
|
|
||||||
|
|
||||||
dns = import sources."dns.nix" { inherit pkgs; };
|
inherit (bootstrap) pkgs;
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
dns = import bootstrap.sources."dns.nix" { inherit pkgs; };
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -28,11 +30,9 @@ in
|
||||||
pkgs.writers.writeJSON "meta.json" config;
|
pkgs.writers.writeJSON "meta.json" config;
|
||||||
|
|
||||||
dns = dns.util.writeZone "dgnum.eu" (
|
dns = dns.util.writeZone "dgnum.eu" (
|
||||||
pkgs.lib.recursiveUpdate { SOA.serial = 0; } (
|
lib.recursiveUpdate { SOA.serial = 0; } (
|
||||||
import ./dns.nix {
|
import ./dns.nix {
|
||||||
inherit dns;
|
inherit dns lib;
|
||||||
|
|
||||||
lib = sources.fullLib;
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue