1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-24 00:21:47 +03:00

imp: pass down self to grouped folder layout

pass `self` to top level imports in the style of
`./examples/groupByConfig`
This commit is contained in:
David Arnold 2021-07-05 20:30:24 -05:00 committed by Parthiv Seetharaman
parent 02d8feb01d
commit 33474e6ffa
4 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
{ self, ... }:
{ {
modules = [ ./python.toml ]; modules = [ ./python.toml ];
} }

View File

@ -1,3 +1,4 @@
{ self, ... }:
{ {
modules = [ ./my-home.nix ]; modules = [ ./my-home.nix ];
} }

View File

@ -1,3 +1,4 @@
{ self, ... }:
{ {
hostDefaults.channelName = "nixos"; hostDefaults.channelName = "nixos";
hosts = { hosts = {

View File

@ -298,6 +298,7 @@ let
nixosType = with types; submoduleWith { nixosType = with types; submoduleWith {
modules = [ modules = [
{ _module.args.self = self; }
{ options = (hostsOpt "nixos") // (hostDefaultsOpt "nixos") // importablesOpt; } { options = (hostsOpt "nixos") // (hostDefaultsOpt "nixos") // importablesOpt; }
legacyImportablesMod legacyImportablesMod
]; ];
@ -305,6 +306,7 @@ let
homeType = with types; submoduleWith { homeType = with types; submoduleWith {
modules = [ modules = [
{ _module.args.self = self; }
{ options = externalModulesOpt // (exportedModulesOpt "home") // importablesOpt; } { options = externalModulesOpt // (exportedModulesOpt "home") // importablesOpt; }
legacyImportablesMod legacyImportablesMod
]; ];
@ -312,6 +314,7 @@ let
devshellType = with types; submoduleWith { devshellType = with types; submoduleWith {
modules = [ modules = [
{ _module.args.self = self; }
{ options = externalModulesOpt // exportedDevshellModulesOpt; } { options = externalModulesOpt // exportedDevshellModulesOpt; }
]; ];
}; };