nixos/glasgow: init hardware module
This commit is contained in:
parent
c05123ba4a
commit
294c4ec956
2 changed files with 24 additions and 0 deletions
23
nixos/modules/hardware/glasgow.nix
Normal file
23
nixos/modules/hardware/glasgow.nix
Normal 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 = { };
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue