diff options
author | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-10-26 11:18:36 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-10-26 19:24:14 +0200 |
commit | 7fe3f63da657f852a93a31108b6d058c68af884d (patch) | |
tree | 5e0f73e9571feafbb41d806c3e7bf33cf820c7a1 /nixos/modules/services/hardware/udev.nix | |
parent | 8191089900837e16cf53348a5c66d45306986474 (diff) | |
download | nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar.gz nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar.bz2 nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar.lz nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar.xz nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.tar.zst nixpkgs-7fe3f63da657f852a93a31108b6d058c68af884d.zip |
nixos/udev: add enable option
Diffstat (limited to 'nixos/modules/services/hardware/udev.nix')
-rw-r--r-- | nixos/modules/services/hardware/udev.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 4b962da0c03..7a7f8330243 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -192,7 +192,6 @@ in ###### interface options = { - boot.hardwareScan = mkOption { type = types.bool; default = true; @@ -205,6 +204,9 @@ in }; services.udev = { + enable = mkEnableOption (lib.mdDoc "udev") // { + default = true; + }; packages = mkOption { type = types.listOf types.path; @@ -345,7 +347,7 @@ in ###### implementation - config = mkIf (!config.boot.isContainer) { + config = mkIf cfg.enable { services.udev.extraRules = nixosRules; |