modules.nix: Generate the extra argument set from the configuration

This allows for module arguments to be handled modularly, in particular
allowing the nixpkgs module to handle the nixpkgs import internally.
This creates the __internal option namespace, which should only be added
to by the module system itself.
This commit is contained in:
Shea Levy
2015-03-12 23:42:57 +01:00
committed by Nicolas B. Pierron
parent 4f5c6330c9
commit 1d62ad4746
3 changed files with 36 additions and 8 deletions
+4 -3
View File
@@ -6,8 +6,9 @@
with lib;
let
parentConfig = config;
pamOpts = args: {
pamOpts = { config, name, ... }: let cfg = config; in let config = parentConfig; in {
options = {
@@ -180,8 +181,8 @@ let
};
config = let cfg = args.config; in {
name = mkDefault args.name;
config = {
name = mkDefault name;
setLoginUid = mkDefault cfg.startSession;
limits = mkDefault config.security.pam.loginLimits;