summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLorenzo Manacorda <lorenzo@mailbox.org>2019-02-14 01:19:56 +0100
committerLorenzo Manacorda <lorenzo@mailbox.org>2019-02-22 19:26:47 +0100
commit1bc0d79650bd1b5a47b437852be39cffc4d5834e (patch)
tree15a5de18a1ab01b963c958473c75f00f3428099e /nixos
parent04cb60bc8699f0d0fbd477e28d8d58ecf0e82aaa (diff)
downloadnixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar.gz
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar.bz2
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar.lz
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar.xz
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.tar.zst
nixpkgs-1bc0d79650bd1b5a47b437852be39cffc4d5834e.zip
nixos/ledger: init
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/hardware/ledger.nix14
-rw-r--r--nixos/modules/module-list.nix1
2 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/hardware/ledger.nix b/nixos/modules/hardware/ledger.nix
new file mode 100644
index 00000000000..41abe74315a
--- /dev/null
+++ b/nixos/modules/hardware/ledger.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.hardware.ledger;
+
+in {
+  options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices";
+
+  config = mkIf cfg.enable {
+    services.udev.packages = [ pkgs.ledger-udev-rules ];
+  };
+}
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 75217581a94..32b3f14e82d 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -44,6 +44,7 @@
   ./hardware/digitalbitbox.nix
   ./hardware/sensor/iio.nix
   ./hardware/ksm.nix
+  ./hardware/ledger.nix
   ./hardware/mcelog.nix
   ./hardware/network/b43.nix
   ./hardware/nitrokey.nix