summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/pcmcia.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
commit5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010 (patch)
treea6c0f605be6de3f372ae69905b331f9f75452da7 /nixos/modules/hardware/pcmcia.nix
parent6070bc016bd2fd945b04347e25cfd3738622d2ac (diff)
Move all of NixOS to nixos/ in preparation of the repository merge
Diffstat (limited to 'nixos/modules/hardware/pcmcia.nix')
-rw-r--r--nixos/modules/hardware/pcmcia.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/nixos/modules/hardware/pcmcia.nix b/nixos/modules/hardware/pcmcia.nix
new file mode 100644
index 000000000000..0dba59734ca7
--- /dev/null
+++ b/nixos/modules/hardware/pcmcia.nix
@@ -0,0 +1,59 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ pcmciaUtils = pkgs.pcmciaUtils.passthru.function {
+ inherit (config.hardware.pcmcia) firmware config;
+ };
+
+in
+
+
+{
+ ###### interface
+
+ options = {
+
+ hardware.pcmcia = {
+ enable = mkOption {
+ default = false;
+ merge = mergeEnableOption;
+ description = ''
+ Enable this option to support PCMCIA card.
+ '';
+ };
+
+ firmware = mkOption {
+ default = [];
+ merge = mergeListOption;
+ description = ''
+ List of firmware used to handle specific PCMCIA card.
+ '';
+ };
+
+ config = mkOption {
+ default = null;
+ description = ''
+ Path to the configuration file which map the memory, irq
+ and ports used by the PCMCIA hardware.
+ '';
+ };
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf config.hardware.pcmcia.enable {
+
+ boot.kernelModules = [ "pcmcia" ];
+
+ services.udev.packages = [ pcmciaUtils ];
+
+ environment.systemPackages = [ pcmciaUtils ];
+
+ };
+
+}