nixos/glasgow: init hardware module

This commit is contained in:
Robert Gerus 2023-09-20 21:29:56 +02:00 committed by Austin Seipp
parent c05123ba4a
commit 294c4ec956
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hardware.glasgow;
in
{
options.hardware.glasgow = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc ''
Enables Glasgow udev rules and ensures 'plugdev' group exists.
This is a prerequisite to using Glasgow without being root.
'';
};
};
config = lib.mkIf cfg.enable {
services.udev.packages = [ pkgs.glasgow ];
users.groups.plugdev = { };
};
}

View File

@ -61,6 +61,7 @@
./hardware/flipperzero.nix
./hardware/flirc.nix
./hardware/gkraken.nix
./hardware/glasgow.nix
./hardware/gpgsmartcards.nix
./hardware/hackrf.nix
./hardware/i2c.nix