Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
23 lines
487 B
Nix
23 lines
487 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.hardware.glasgow;
|
|
|
|
in
|
|
{
|
|
options.hardware.glasgow = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = ''
|
|
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 = { };
|
|
};
|
|
}
|