1
0
Fork 0

ops: inject the machine's pkgs into the machine's hscloud tree

This ensures, for example, that the packets are for the correct
architecture.

Change-Id: If17c307fbad02ee72c6dd21a874c59514415ab2e
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1334
Reviewed-by: implr <implr@hackerspace.pl>
master
q3k 2022-07-07 17:47:58 +02:00 committed by q3k
parent dcdbd8425c
commit c35ea6a220
2 changed files with 12 additions and 9 deletions

View File

@ -18,12 +18,15 @@ let
config.allowBroken = true;
};
in fix (self: (readTree rec {
hscloud = self;
pkgs = nixpkgs;
pkgsSrc = nixpkgsSrc;
inherit (nixpkgs) lib stdenv;
} ./.) // {
resForPkgs = pkgs: fix (self: (readTree rec {
hscloud = self;
inherit pkgs;
pkgsSrc = pkgs.path;
inherit (pkgs) lib stdenv;
hscloudForPkgs = pkgs: resForPkgs pkgs;
} ./.));
in (resForPkgs nixpkgs) // {
root = ./.;
pkgs = nixpkgs;
})
}

View File

@ -5,7 +5,7 @@
#
# For information about building/deploying machines see //ops/README.md.
{ hscloud, pkgs, ... }:
{ hscloud, pkgs, hscloudForPkgs, ... }:
let
# nixpkgs for cluster machines (.hswaw.net). Currently pinned to an old
@ -121,7 +121,7 @@ let
passthru.hscloud.provision = pkgs.writeScript "provision-${fqdn}" runProvision;
# TODO(q3k): this should be named hscloud, but that seems to not work. Debug and rename.
_module.args.workspace = hscloud;
_module.args.workspace = hscloudForPkgs pkgs;
_module.args.machines = machines;
};
});