nixpkgs/nixos/modules/programs/flashrom.nix
R-VdP 8467c63749
flashrom: use a udev uaccess tag instead of introducing a custom flashrom group
See https://wiki.archlinux.org/title/Udev#Allowing_regular_users_to_use_devices for more info about the uaccess tag. The udev-acl tag is a legacy implementation, we add it purely for backwards compatibility.
2023-02-17 15:56:51 +01:00

27 lines
578 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.flashrom;
in
{
options.programs.flashrom = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Installs flashrom and configures udev rules for programmers
used by flashrom. Grants access to users in the "flashrom"
group.
'';
};
package = mkPackageOptionMD pkgs "flashrom" { };
};
config = mkIf cfg.enable {
services.udev.packages = [ cfg.package ];
environment.systemPackages = [ cfg.package ];
};
}