1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 16:11:51 +03:00

add module importer (raker)

This commit is contained in:
David Arnold 2021-06-13 21:27:48 -05:00 committed by Parthiv Seetharaman
parent d38d316401
commit 9836d2aeeb
7 changed files with 21 additions and 10 deletions

View File

@ -175,6 +175,12 @@ in
overlays = lib.mkAfter (builtins.attrValues (flattenTree (rakeLeaves dir)));
};
modules = dir:
{
# Meant to output a module that sets the modules option
modules = builtins.attrValues (flattenTree (rakeLeaves dir));
};
hosts = dir:
{
# Meant to output a module that sets the hosts option (including constructed host names)

View File

@ -145,11 +145,14 @@ let
includeHostsModule = name: {
options = with types; {
hostDefaults = mkOption {
type = submodule [
type = submoduleWith {
# allows easy use of the `imports` key
modules = [
hostModule
externalModulesModule
(exportModulesModule name)
];
};
default = { };
description = ''
Defaults for all hosts.

View File

@ -45,10 +45,10 @@ let
hostDefaults = {
system = "x86_64-linux";
channelName = "nixos";
modules = ./modules/module-list.nix;
imports = [ (lib.importers.modules ./modules) ];
externalModules = [
{ _module.args.ourlib = self.lib; }
./modules/customBuilds.nix
./modules/customBuilds.nix # avoid exporting
];
};
@ -68,7 +68,7 @@ let
};
home = {
modules = ./users/modules/module-list.nix;
imports = [ (lib.importers.modules ./user/modules) ];
externalModules = [ ];
importables = rec {
profiles = lib.importers.rakeLeaves ./profiles;

View File

@ -0,0 +1,2 @@
{ ... }: {
}

View File

@ -1 +0,0 @@
[ ]

View File

@ -1 +0,0 @@
[ ]

View File

@ -0,0 +1,2 @@
{ ... }: {
}