From 69ca85cc7bb356876544f8ddf4d6bb56e0c6c988 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Wed, 18 Sep 2024 22:09:53 +0200 Subject: [PATCH] nixos/pulseview: init module Pulseview needs the libsigrok udev rules to be installed, this module removes the need for the enduser to think about this dependency. --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/pulseview.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 nixos/modules/programs/pulseview.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 14a977c99e87..5068a04c8d34 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -265,6 +265,7 @@ ./programs/pqos-wrapper.nix ./programs/projecteur.nix ./programs/proxychains.nix + ./programs/pulseview.nix ./programs/qdmr.nix ./programs/qgroundcontrol.nix ./programs/qt5ct.nix diff --git a/nixos/modules/programs/pulseview.nix b/nixos/modules/programs/pulseview.nix new file mode 100644 index 000000000000..f8db5a467d53 --- /dev/null +++ b/nixos/modules/programs/pulseview.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.programs.pulseview; +in +{ + options.programs.pulseview = { + enable = lib.mkEnableOption "pulseview, a sigrok GUI"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ + pkgs.pulseview + ]; + + services.udev = { + packages = [ + # Pulseview needs some udev rules provided by libsigrok to access devices + pkgs.libsigrok + ]; + }; + }; +}