diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-14 16:26:48 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-14 16:26:48 +0200 |
commit | 29027fd1e12461fc5ff5722bea79df7ff4299599 (patch) | |
tree | fec0d7ba9f295be106fcf41759cee8b94d79dc9d /nixos/modules/security | |
parent | 4f2aa2f7061984fa7aa21bac92ed5eec3f3daa06 (diff) |
Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
Diffstat (limited to 'nixos/modules/security')
-rw-r--r-- | nixos/modules/security/apparmor-suid.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/apparmor.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/ca.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/duosec.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/grsecurity.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/pam.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/pam_usb.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/polkit.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/prey.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/rngd.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/rtkit.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/setuid-wrappers.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/sudo.nix | 4 |
13 files changed, 26 insertions, 26 deletions
diff --git a/nixos/modules/security/apparmor-suid.nix b/nixos/modules/security/apparmor-suid.nix index bc661164fdc29..b89b379ae6668 100644 --- a/nixos/modules/security/apparmor-suid.nix +++ b/nixos/modules/security/apparmor-suid.nix @@ -1,8 +1,8 @@ -{pkgs, config, ...}: +{ config, lib, pkgs, ... }: let cfg = config.security.apparmor; in -with pkgs.lib; +with lib; { options.security.apparmor.confineSUIDApplications = mkOption { diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index b9f1515900282..29ac71777f031 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -1,10 +1,10 @@ -{pkgs, config, ...}: +{ config, lib, pkgs, ... }: let cfg = config.security.apparmor; in -with pkgs.lib; +with lib; { diff --git a/nixos/modules/security/ca.nix b/nixos/modules/security/ca.nix index 05cd1c3ecc17f..f159e359f968f 100644 --- a/nixos/modules/security/ca.nix +++ b/nixos/modules/security/ca.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; { diff --git a/nixos/modules/security/duosec.nix b/nixos/modules/security/duosec.nix index 989bd13d101e1..bd9611384828b 100644 --- a/nixos/modules/security/duosec.nix +++ b/nixos/modules/security/duosec.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let cfg = config.security.duosec; diff --git a/nixos/modules/security/grsecurity.nix b/nixos/modules/security/grsecurity.nix index 913a0afc45256..90462a2d6d0dc 100644 --- a/nixos/modules/security/grsecurity.nix +++ b/nixos/modules/security/grsecurity.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let cfg = config.security.grsecurity; diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 93d12d292e4d5..0d205ce07e566 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -1,9 +1,9 @@ # This module provides configuration for the PAM (Pluggable # Authentication Modules) system. -{config, pkgs, ...}: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let diff --git a/nixos/modules/security/pam_usb.nix b/nixos/modules/security/pam_usb.nix index 4cc99995fbcaa..11708a1f01679 100644 --- a/nixos/modules/security/pam_usb.nix +++ b/nixos/modules/security/pam_usb.nix @@ -1,6 +1,6 @@ -{config, pkgs, ...}: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index dbec4ad98d160..054d39c478530 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let diff --git a/nixos/modules/security/prey.nix b/nixos/modules/security/prey.nix index 75b95d5fbb04f..e29fa5395a1ab 100644 --- a/nixos/modules/security/prey.nix +++ b/nixos/modules/security/prey.nix @@ -1,6 +1,6 @@ -{config, pkgs, ...}: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let cfg = config.services.prey; diff --git a/nixos/modules/security/rngd.nix b/nixos/modules/security/rngd.nix index 720ac02f2e811..c31e57e6f6f8f 100644 --- a/nixos/modules/security/rngd.nix +++ b/nixos/modules/security/rngd.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; { options = { diff --git a/nixos/modules/security/rtkit.nix b/nixos/modules/security/rtkit.nix index 164ad9b3aa7db..ba07591bb7700 100644 --- a/nixos/modules/security/rtkit.nix +++ b/nixos/modules/security/rtkit.nix @@ -1,9 +1,9 @@ # A module for ‘rtkit’, a DBus system service that hands out realtime # scheduling priority to processes that ask for it. -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; { diff --git a/nixos/modules/security/setuid-wrappers.nix b/nixos/modules/security/setuid-wrappers.nix index 78be1cc6cdeef..109e61df79e6e 100644 --- a/nixos/modules/security/setuid-wrappers.nix +++ b/nixos/modules/security/setuid-wrappers.nix @@ -1,6 +1,6 @@ -{pkgs, config, ...}: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 215a8ecd60187..956856c64995e 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -1,6 +1,6 @@ -{pkgs, config, ...}: +{ config, lib, pkgs, ... }: -with pkgs.lib; +with lib; let |