aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-08-15 22:05:48 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-08-15 22:05:48 +0300
commit725a7dc2f64c69bada9da1e234ddf091066d8249 (patch)
tree884332c9a59562c58b41e5016a459503d827b382
parent84b428d383665f6c45eaba85be37eb7e9c944b0e (diff)
downloadnixsap-725a7dc2f64c69bada9da1e234ddf091066d8249.tar.gz
Fix weird evalutation error in raid0.nix
Propably due to "implicit imports" which is unwise anyway. The error was: while evaluating the attribute 'physical' at ..../nixpkgs/lib/modules.nix:198:7: while evaluating 'evalOptionValue' at ..../nixpkgs/lib/modules.nix:286:31, called from ..../nixpkgs/lib/modules.nix:221:16: while evaluating 'fixupOptionType' at ..../nixpkgs/lib/modules.nix:454:26, called from ..../nixpkgs/lib/modules.nix:220:23: while evaluating the attribute 'type.getSubModules' at ..../nixpkgs/lib/types.nix:91:14: value is a built-in function while a set was expected, at ..../nixpkgs/lib/types.nix:254:23
-rw-r--r--modules/system/raid0.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/modules/system/raid0.nix b/modules/system/raid0.nix
index d260e29..ed946d2 100644
--- a/modules/system/raid0.nix
+++ b/modules/system/raid0.nix
@@ -1,10 +1,20 @@
{ config, pkgs, lib, ... }:
-with lib;
-with lib.types;
-with builtins;
-
let
+
+ inherit (builtins)
+ attrNames
+ ;
+
+ inherit (lib)
+ concatStringsSep filterAttrs foldl genAttrs mapAttrs' mapAttrsToList
+ mkOption nameValuePair removePrefix replaceStrings
+ ;
+
+ inherit (lib.types)
+ attrsOf enum int listOf path submodule
+ ;
+
groups = filterAttrs (n: _: n != "_module") config.nixsap.system.lvm.raid0;
createLV = vg: lv: s: opts: