From b3cfb9084b3860852581be235aea90540a5302d4 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 5 May 2014 14:58:51 -0400 Subject: Get all lib functions from lib, not pkgs.lib, in modules --- nixos/modules/tasks/encrypted-devices.nix | 4 ++-- nixos/modules/tasks/filesystems/f2fs.nix | 4 ++-- nixos/modules/tasks/filesystems/unionfs-fuse.nix | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'nixos/modules/tasks') diff --git a/nixos/modules/tasks/encrypted-devices.nix b/nixos/modules/tasks/encrypted-devices.nix index e56549149cb8..0370e36fbec2 100644 --- a/nixos/modules/tasks/encrypted-devices.nix +++ b/nixos/modules/tasks/encrypted-devices.nix @@ -1,6 +1,6 @@ -{ config, pkgs, modulesPath, ... }: +{ config, lib, ... }: -with pkgs.lib; +with lib; let fileSystems = attrValues config.fileSystems ++ config.swapDevices; diff --git a/nixos/modules/tasks/filesystems/f2fs.nix b/nixos/modules/tasks/filesystems/f2fs.nix index 8655107360c1..1ed7b1b6a62e 100644 --- a/nixos/modules/tasks/filesystems/f2fs.nix +++ b/nixos/modules/tasks/filesystems/f2fs.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: -with pkgs.lib; +with lib; let inInitrd = any (fs: fs == "f2fs") config.boot.initrd.supportedFilesystems; diff --git a/nixos/modules/tasks/filesystems/unionfs-fuse.nix b/nixos/modules/tasks/filesystems/unionfs-fuse.nix index 177c97f85c78..5b7777180568 100644 --- a/nixos/modules/tasks/filesystems/unionfs-fuse.nix +++ b/nixos/modules/tasks/filesystems/unionfs-fuse.nix @@ -1,8 +1,8 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { - config = pkgs.lib.mkMerge [ - (pkgs.lib.mkIf (pkgs.lib.any (fs: fs == "unionfs-fuse") config.boot.initrd.supportedFilesystems) { + config = lib.mkMerge [ + (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.initrd.supportedFilesystems) { boot.initrd.kernelModules = [ "fuse" ]; boot.initrd.extraUtilsCommands = '' @@ -17,7 +17,7 @@ ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin ''; }) - (pkgs.lib.mkIf (pkgs.lib.any (fs: fs == "unionfs-fuse") config.boot.supportedFilesystems) { + (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.supportedFilesystems) { system.fsPackages = [ pkgs.unionfs-fuse ]; }) ]; -- cgit 1.4.1