mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
27 lines
552 B
Nix
27 lines
552 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.programs.flashrom;
|
||
|
in
|
||
|
{
|
||
|
options.programs.flashrom = {
|
||
|
enable = mkOption {
|
||
|
type = types.bool;
|
||
|
default = false;
|
||
|
description = ''
|
||
|
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 = { };
|
||
|
};
|
||
|
}
|