2021-06-26 01:37:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.flashrom;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.flashrom = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-07-28 21:19:15 +00:00
|
|
|
description = lib.mdDoc ''
|
2021-06-26 01:37:52 +00:00
|
|
|
Installs flashrom and configures udev rules for programmers
|
|
|
|
used by flashrom. Grants access to users in the "flashrom"
|
|
|
|
group.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.udev.packages = [ pkgs.flashrom ];
|
|
|
|
environment.systemPackages = [ pkgs.flashrom ];
|
|
|
|
users.groups.flashrom = { };
|
|
|
|
};
|
|
|
|
}
|