Files
nixpkgs/nixos/modules/hardware/glasgow.nix
Florian Klink 53193bb729 nixos/glasgow: add glasgow to systemPackages
That's what various other tools in hardware.* do, it's surpising if
`hardware.glasgow.enable` does not actually give you the `glasgow`
binary in `$PATH`.
2025-12-25 18:15:01 +01:00

30 lines
546 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 {
environment.systemPackages = [ pkgs.glasgow ];
services.udev.packages = [ pkgs.glasgow ];
users.groups.plugdev = { };
};
}