Apply mornfall's SANE patches
Fix sane-backends to generate udev rules, add a snapshot of sane-backends's unstable repo, and add a SANE nixos module svn path=/nixos/trunk/; revision=30764
This commit is contained in:
parent
72d7401976
commit
e87764e327
@ -68,6 +68,7 @@
|
|||||||
./services/hardware/bluetooth.nix
|
./services/hardware/bluetooth.nix
|
||||||
./services/hardware/hal.nix
|
./services/hardware/hal.nix
|
||||||
./services/hardware/pcscd.nix
|
./services/hardware/pcscd.nix
|
||||||
|
./services/hardware/sane.nix
|
||||||
./services/hardware/udev.nix
|
./services/hardware/udev.nix
|
||||||
./services/hardware/udisks.nix
|
./services/hardware/udisks.nix
|
||||||
./services/hardware/upower.nix
|
./services/hardware/upower.nix
|
||||||
|
34
modules/services/hardware/sane.nix
Normal file
34
modules/services/hardware/sane.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
hardware.sane.enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable support for SANE scanners.";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.sane.snapshot = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Use a development snapshot of SANE scanner drivers.";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = let pkg = if config.hardware.sane.snapshot
|
||||||
|
then pkgs.saneBackendsSnapshot
|
||||||
|
else pkgs.saneBackends;
|
||||||
|
in mkIf config.hardware.sane.enable {
|
||||||
|
environment.systemPackages = [ pkg ];
|
||||||
|
services.udev.packages = [ pkg ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user