Closed michalrus closed 4 years ago
I am currently doing the same. Until this feature is included into upstream i will document it into the nixos-users wiki: https://github.com/nixos-users/wiki/wiki/Scanners
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
@michalrus There's this netConf
option. This issue is ancient and stale so I'm closing.
fair enough, thanks for following up!
How is netConf supposed to replace configuration of backend that user uses? For example, I am trying to use sane-airscan, it has its own config file in /etc/sane.d/airscan.conf. How netConf can know about it and create the config with my parameters which are not just simple IP address?
I'm using the airscan backend my self and I've just verified it works a few days ago. @tex look at this:
If a sane backend package has a either of the common files (see lines 16-17):
$out/etc/sane.d/dll.conf
$out/etc/sane.d/net.conf
$out/etc/sane.d/saned.conf
Their contents are merged by this derivation, and then, after a rebuild (and a logout-login) SANE_CONFIG_DIR
should point to a derivation with this backend available, both thanks to the configs symlinked and the shared object libraries symlinked to $SANE_CONFIG_DIR/lib
.
For sane-airscan
, there's supposed to be $SANE_CONFIG_DIR/airscan.conf
and $SANE_CONFIG_DIR/dll.conf
which should contain at the end of it the lines:
# sane-dll entry for sane-airscan
airscan
Concatenated by the derivation's installPhase
.
If you do not see this evidence that sane-airscan
is configured, then there's something wrong with the way you use (or not use) the NixOS option hardware.sane.backends
.
If you do see this evidence for airscan "installed" in $SANE_CONFIG_DIR
, and you still don't see your airscan compatible scanner, then perhaps you are missing some avahi related settings. These work for me:
services.avahi.enable = true;
services.avahi.nssmdns = true;
services.avahi.reflector = true;
I'm quite new to NixOS and have quite a few difficulties installing my network scanner. With the sane-airscan
backend and netConf
option I can configure my scanner but get an I/O Error while scanning. On Arch Linux I configured the backend as described by @michalrus, so I used the custom module method as described in NixosWiki. But a nixos-rebuild switch
produces an BadStorePath Error. Has anyone the same problem, or can someone give me some hints how to debug these errors?
The scanner I'm using is a Samsung M2885FW and my system is on version 20.09.
I have this and it works for me. Does your scanner works with sane-airscan on Arch? Is NixOS sane-airscan older version?
hardware.sane =
{ enable = true;
extraBackends = [ sane-airscan ];
};
services.saned.enable = true;
On Arch I never tested the sane-airscan backend. But it worked with the samsung-unified-driver and with the static IP-Adress added to /etc/sane.d/xerox_mfp.conf
. After reading the NixosWiki article I saw that my scanner should also support sane-airscan. So I tried that with the same settings you have. With that the scanner was found, but I get an I/O Error every time I try to scan.
I have WorkCentre 3025 and that was not supported by sane-airscan, but I provided a communication dump during attempt to scan (via Ethernet and Wireshark) and author of sane-airscan was able to find out what is wrong and added support for it. He is very active and nice.
Ahh dumb me. With the sane-airscan
package from the unstable branch of nixpkgs it works. Thank you for your help.
@michalrus There's this
netConf
option. This issue is ancient and stale so I'm closing.
This is not the same. netConf/net.conf is for specifying other hosts running saned, not networked scanners. These need to be specified in their sane driver configs. Currently it is not possible to add lines to these config files (except for net.conf). This ticket suggests adding a config option to allow adding lines to the other drivers.
@returntoreality I'm not sure I understood what you were trying to explain. Could you please perhaps open a separate issue, explaining why netConf
isn't what you need?
I created ticket #295008 which hopefully explains it a bit better.
Issue description
Some SANE backends require additional configuration, e.g. an address of a network scanner.
Currently I’m using my custom module — https://github.com/michalrus/dotfiles/commit/d943be3089aa436e07cea5f22d829402936a9229 — to configure Sane on various devices. Using it, you can do:
Technical details