add overlays and extraPkgConfig support
This commit is contained in:
parent
0a74fb6ac2
commit
c233cb88e4
2 changed files with 21 additions and 10 deletions
|
|
@ -12,8 +12,10 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
{
|
{
|
||||||
|
self,
|
||||||
this,
|
this,
|
||||||
sys,
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
nt,
|
nt,
|
||||||
lib,
|
lib,
|
||||||
deploy-rs,
|
deploy-rs,
|
||||||
|
|
@ -33,11 +35,6 @@
|
||||||
mapNodes
|
mapNodes
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
|
||||||
(nib.std)
|
|
||||||
getAttrOr
|
|
||||||
;
|
|
||||||
|
|
||||||
templateNexus = let
|
templateNexus = let
|
||||||
inherit
|
inherit
|
||||||
(nt.types)
|
(nt.types)
|
||||||
|
|
@ -51,6 +48,7 @@
|
||||||
'');
|
'');
|
||||||
in {
|
in {
|
||||||
groups = missing "an list of all valid node group names." "groups";
|
groups = missing "an list of all valid node group names." "groups";
|
||||||
|
overlays = [];
|
||||||
nodes = Terminal {};
|
nodes = Terminal {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -80,11 +78,21 @@
|
||||||
[../nixos-module host] ++ node.extraModules;
|
[../nixos-module host] ++ node.extraModules;
|
||||||
|
|
||||||
# nix passes these to every single module
|
# nix passes these to every single module
|
||||||
specialArgs =
|
specialArgs = let
|
||||||
|
pkgConfig =
|
||||||
|
{
|
||||||
|
inherit (node) system;
|
||||||
|
# XXX: WARNING: TODO: i've stopped caring
|
||||||
|
# XXX: WARNING: TODO: just figure out a better solution to pkgConfig
|
||||||
|
config.allowUnfree = true;
|
||||||
|
overlays = self.overlays ++ nexus.overlays ++ node.overlays;
|
||||||
|
}
|
||||||
|
// node.extraPkgConfig;
|
||||||
|
in
|
||||||
node.specialArgs
|
node.specialArgs
|
||||||
// {
|
// {
|
||||||
pkgs = sys.pkgsFor node.system;
|
pkgs = import nixpkgs pkgConfig;
|
||||||
upkgs = sys.upkgsFor node.system;
|
upkgs = import nixpkgs-unstable pkgConfig;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -143,7 +151,7 @@
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
mkNexus = root: outputs': let
|
mkNexus = root: outputs': let
|
||||||
autogen = mkNexus' root <| getAttrOr "nexus" {} outputs';
|
autogen = mkNexus' root (outputs'.nexus or {});
|
||||||
outputs = removeAttrs outputs' ["nexus"];
|
outputs = removeAttrs outputs' ["nexus"];
|
||||||
in
|
in
|
||||||
autogen // outputs; # XXX: TODO: replace this with a deep merge
|
autogen // outputs; # XXX: TODO: replace this with a deep merge
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ in rec {
|
||||||
system = "x86_64-linux"; # sane default (i hope...)
|
system = "x86_64-linux"; # sane default (i hope...)
|
||||||
extraModules = [];
|
extraModules = [];
|
||||||
specialArgs = Terminal {};
|
specialArgs = Terminal {};
|
||||||
|
overlays = [];
|
||||||
|
# XXX: WARNING: extraPkgConfig is a terrible solution (but im lazy for now)
|
||||||
|
extraPkgConfig = Terminal {};
|
||||||
|
|
||||||
deploy = {
|
deploy = {
|
||||||
user = "root";
|
user = "root";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue