summary refs log tree commit diff
path: root/nixos/modules/security
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-05-05 15:18:53 -0400
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-03-12 23:42:57 +0100
commit1d62ad474694c0717017c2c8aa79909a890407b5 (patch)
treef541c744e6e3747155bb2b5bd25491d634cc6abd /nixos/modules/security
parent4f5c6330c9f3df2533daf33ecaf0c52420979674 (diff)
downloadnixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar.gz
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar.bz2
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar.lz
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar.xz
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.tar.zst
nixlib-1d62ad474694c0717017c2c8aa79909a890407b5.zip
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.
Diffstat (limited to 'nixos/modules/security')
-rw-r--r--nixos/modules/security/pam.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index e81278a95d5c..631e8317cb4c 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -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;