Scanners: Difference between revisions

Klinger (talk | contribs)
mNo edit summary
DoggoBit (talk | contribs)
m Mark wall of config
 
(2 intermediate revisions by 2 users not shown)
Line 52: Line 52:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
hardware.sane.extraBackends = [ pkgs.sane-airscan ];
hardware.sane.extraBackends = [ pkgs.sane-airscan ];
services.udev.packages = [ pkgs.sane-airscan ];
</syntaxhighlight>
</syntaxhighlight>


Line 131: Line 132:


<ol>
<ol>
<li>You need to install a special version of xsane, which you can enable by amending <tt>/etc/nixos/configuration.nix</tt> as follows:
<li>Enable GIMP support in xsane by editing <tt>/etc/nixos/configuration.nix.</tt> Remove <tt>pkgs.xsane</tt> from your package list, and use the following instead:


<syntaxhighlight lang="nix">{
<syntaxhighlight lang="nix">{
   ...
   #...
   nixpkgs.config.packageOverrides = pkgs: {
   environment.systemPackages = [
     xsaneGimp = pkgs.xsane.override { gimpSupport = true; };
     (pkgs.xsane.override { gimpSupport = true; })
   };
   ];
   ...
   #...
}</syntaxhighlight></li>
}</syntaxhighlight></li>
<li>Rebuild: <syntaxhighlight lang="console">$ sudo nixos-rebuild switch</syntaxhighlight></li>
<li>Rebuild: <syntaxhighlight lang="console">$ sudo nixos-rebuild switch</syntaxhighlight></li>
Line 147: Line 148:
==Network scanning==
==Network scanning==


If NixOs cannot find a scanner located on your network, you may be interested in adding in your <tt>configuration.nix</tt>:
If NixOS cannot find a scanner located on your network, you may be interested in adding in your <tt>configuration.nix</tt>:


<syntaxhighlight lang="nix">{
<syntaxhighlight lang="nix">{
Line 173: Line 174:


==Using the scanner button==
==Using the scanner button==
{{WOC}}
Many scanners feature a hardware button which makes for very convenient operation, especially in combination with an automated document processing system like <tt>paperless</tt>.  NixOS includes the scanner button daemon <tt>scanbd</tt> which can be used for this purpose; however, its setup isn't terribly user friendly.
Many scanners feature a hardware button which makes for very convenient operation, especially in combination with an automated document processing system like <tt>paperless</tt>.  NixOS includes the scanner button daemon <tt>scanbd</tt> which can be used for this purpose; however, its setup isn't terribly user friendly.


Line 365: Line 367:
       };
       };
}</syntaxhighlight>
}</syntaxhighlight>


==See also==
==See also==