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:
committed by
Nicolas B. Pierron
parent
4f5c6330c9
commit
1d62ad4746
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user