2021-06-26 01:37:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.flashrom;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.flashrom = {
|
2024-04-17 11:37:58 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2021-06-26 01:37:52 +00:00
|
|
|
default = false;
|
2024-04-13 12:54:15 +00:00
|
|
|
description = ''
|
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.
|
|
|
|
'';
|
|
|
|
};
|
2024-04-17 11:37:58 +00:00
|
|
|
package = lib.mkPackageOption pkgs "flashrom" { };
|
2021-06-26 01:37:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-17 11:37:58 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2022-11-24 20:31:07 +00:00
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
2021-06-26 01:37:52 +00:00
|
|
|
};
|
|
|
|
}
|