feat(bootstrap): Add the root of the repository

This avoids making ../../.. in some places
This commit is contained in:
Tom Hubrecht 2025-04-14 14:02:42 +02:00 committed by thubrecht
parent 6ffa71c17d
commit 8f8585038d
3 changed files with 11 additions and 7 deletions

View file

@ -27,6 +27,8 @@ in
{
inherit overlays sources unpatchedSources;
root = ./.;
pkgs = pkgs // {
lib = pkgs.lib.extend overlays.lib;
};

View file

@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: EUPL-1.2
{ bootstrap, ... }:
let
host = "docuseal.dgnum.eu";
port = 2500;
@ -12,7 +14,7 @@ in
nixpkgs.overlays = [
(self: _: {
docuseal = self.callPackage ../../../../pkgs/by-name/docuseal { };
docuseal = self.callPackage (bootstrap.root + "/pkgs/by-name/docuseal") { };
})
];

View file

@ -5,13 +5,13 @@
{
lib,
meta,
bootstrap,
sources,
dgn-keys,
...
}:
let
inherit (lib.extra) mkImports;
hive-root = ../../../..;
host = "search.infra.dgnum.eu";
in
{
@ -24,14 +24,14 @@ in
enable = true;
modules = {
"netconf" = {
paths = mkImports hive-root [
paths = mkImports bootstrap.root [
"modules/netconf"
"modules/generic"
"lib/netconf-junos"
];
path-translations = [
{
base = hive-root;
base = bootstrap.root;
url = "https://git.dgnum.eu/DGNum/infrastructure/src/branch/main/";
}
];
@ -39,11 +39,11 @@ in
"DGNum Infrastructure" =
let
# prefer a non-patched nixpkgs
infra-nixpkgs = (import "${hive-root}/bootstrap.nix").pkgs;
infra-nixpkgs = bootstrap.pkgs;
infra-modulesPath = "${infra-nixpkgs.path}/nixos/modules/";
in
{
paths = mkImports hive-root [
paths = mkImports bootstrap.root [
"modules/generic"
"modules/nixos"
];
@ -71,7 +71,7 @@ in
};
path-translations = [
{
base = hive-root;
base = bootstrap.root;
url = "https://git.dgnum.eu/DGNum/infrastructure/src/branch/main/";
}
{