about summary refs log tree commit diff
path: root/lib/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-03-18 14:06:22 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-03-18 14:11:42 +0100
commit95ff01f8965fd3b09953c75d16c4e2e7af38aa41 (patch)
tree9b3756971fbeb06c6d86f790383e0517271b4c27 /lib/default.nix
parent7fc10424d9460046c18b5649e580cf308489501b (diff)
lib: Refactor kernel configuration into a module.
This means, we don't have that lib directory anymore and also we're not
doing text substitution on the kernel config but instead override the
original attributes.

However, this needs to be refactored even further, so we can use the
NixOS kernel system, which allows for certain modules to require
specific kernel features. That way we can automatically create a kernel
config from the list of required features and we only need to set a
specific base config instead of specifying the *full* kernel config.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/default.nix b/lib/default.nix
deleted file mode 100644
index 95f4f39f..00000000
--- a/lib/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-with import <nixpkgs> {};
-
-with pkgs.lib;
-
-{
-  generateKConf = exprs: let
-    isNumber = c: elem c ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"];
-    mkValue = val:
-      if val == "" then "\"\""
-      else if val == "y" || val == "m" || val == "n" then val
-      else if all isNumber (stringToCharacters val) then val
-      else if substring 0 2 val == "0x" then val
-      else "\"${val}\"";
-    mkConfigLine = key: val: "${key}=${mkValue val}";
-    mkConf = cfg: concatStringsSep "\n" (mapAttrsToList mkConfigLine cfg);
-  in pkgs.writeText "generated.kconf" (mkConf exprs);
-}