mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
nixos/glasgow: init hardware module
This commit is contained in:
parent
c05123ba4a
commit
294c4ec956
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/flipperzero.nix
|
||||||
./hardware/flirc.nix
|
./hardware/flirc.nix
|
||||||
./hardware/gkraken.nix
|
./hardware/gkraken.nix
|
||||||
|
./hardware/glasgow.nix
|
||||||
./hardware/gpgsmartcards.nix
|
./hardware/gpgsmartcards.nix
|
||||||
./hardware/hackrf.nix
|
./hardware/hackrf.nix
|
||||||
./hardware/i2c.nix
|
./hardware/i2c.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user