3
0
Fork 0
forked from mirrors/nixpkgs

nixos/dmrconfig: Add module to enable udev rules

This commit is contained in:
Elis Hirwing 2018-11-07 18:34:37 +01:00
parent 9ec968fbf0
commit a1f23bf1c8
No known key found for this signature in database
GPG key ID: D57EFA625C9A925F
2 changed files with 39 additions and 0 deletions

View file

@ -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

View 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 ];
};
}