forked from mirrors/nixpkgs
nixos/dmrconfig: Add module to enable udev rules
This commit is contained in:
parent
9ec968fbf0
commit
a1f23bf1c8
|
@ -90,6 +90,7 @@
|
|||
./programs/criu.nix
|
||||
./programs/dconf.nix
|
||||
./programs/digitalbitbox/default.nix
|
||||
./programs/dmrconfig.nix
|
||||
./programs/environment.nix
|
||||
./programs/firejail.nix
|
||||
./programs/fish.nix
|
||||
|
|
38
nixos/modules/programs/dmrconfig.nix
Normal file
38
nixos/modules/programs/dmrconfig.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.dmrconfig;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.etu ];
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
programs.dmrconfig = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to configure system to enable use of dmrconfig. This
|
||||
enables the required udev rules and installs the program.
|
||||
'';
|
||||
relatedPackages = [ "dmrconfig" ];
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.dmrconfig;
|
||||
type = types.package;
|
||||
defaultText = "pkgs.dmrconfig";
|
||||
description = "dmrconfig derivation to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
services.udev.packages = [ cfg.package ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue