summary refs log tree commit diff
path: root/nixos/modules/hardware/ledger.nix
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/modules/hardware/ledger.nix
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/modules/hardware/ledger.nix')
-rw-r--r--nixos/modules/hardware/ledger.nix14
1 files changed, 14 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 ];
+  };
+}