Commit Graph

37 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Niklas Hambüchen
d65c4445a9 Add hardware.sane.backends-package option.
Allows overriding `sane-backends` drivers without rebuilding many packages.
2023-12-10 07:42:17 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Bjørn Forsman
700adb32e9 nixos/sane: point SANE_CONFIG_DIR away from /etc/sane.d
This brings back the ability to e.g. configure sane-airscan with
`environment.etc."sane.d/airscan.conf".text = ...`.

(AFAICT, sane-airscan loads all config files it finds, so it'll first
load the one from the nixos hardware.sane.* configuration, then the user
specified one in /etc/sane.d/airscan.conf.)

Fixes: 4fbec87a5b ("nixos/sane: point env vars to /etc for quick reload")

Fixes https://github.com/NixOS/nixpkgs/issues/207262
2022-12-25 12:34:50 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Ryan Lahfa
da5ef17a96
Merge pull request #199520 from bjornfor/nixos-hardware-sane-open-firewal
nixos/sane: add openFirewall option
2022-12-01 14:50:11 +01:00
Guillaume Girol
4c633f0301
Merge pull request #199667 from bjornfor/nixos-sane-indirection-for-quick-reload
nixos/sane: point env vars to /etc for quick reload
2022-11-13 10:05:05 +00:00
Bjørn Forsman
f23ddc55a6 nixos/sane: mention sane-airscan in the extraBackends option
It's a very useful backend (that probably should be enabled by default,
like on Ubuntu), let's start by making it easier to discover.

Ref https://github.com/NixOS/nixpkgs/issues/28406.
2022-11-05 16:19:04 +01:00
Bjørn Forsman
4fbec87a5b nixos/sane: point env vars to /etc for quick reload
Point $SANE_CONFIG_DIR and $LD_LIBRARY_PATH to symlinks in /etc, instead
of directly to nix store paths, so that activating a new configuration
takes effect immediately, instead of requiring users to re-login.
2022-11-05 10:40:51 +01:00
Bjørn Forsman
c3cff074f8 nixos/sane: add openFirewall option
Open ports needed for discovery of scanners on the local network, e.g.
needed for Canon scanners (BJNP protocol).

Ref. https://github.com/NixOS/nixpkgs/issues/28406.
2022-11-04 14:05:43 +01:00
pennae
722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +02:00
pennae
9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Profpatsch
6376458424 sane: Add support for the unfree Fujitsu ScanSnap drivers
This adds the scanner files already linked from the
`etc/sane.d/epjitsu.conf` file, which are extracted from the Windows
drivers and mirrored on GitHub.

Being a Japanese hardware vendor, Fujitsu’s software release &
licensing methods are horrifying, but their scanners are some of the
best, so we should definitly have discoverable support for them, which
this patch hopefully adds.

Inspiration was taken from the following sources:
https://www.josharcher.uk/code/install-scansnap-s1300-drivers-linux/
https://ubuntuforums.org/archive/index.php/t-1461915.html
https://github.com/stevleibelt/scansnap-firmware
2021-08-01 13:45:46 +02:00
Vladimir Serov
7d396a4219
nixos/sane: added lp and avahi group (#117952)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-04-12 21:29:49 +02:00
Guillaume Girol
4e83ef8026
Merge pull request #113703 from symphorien/disable-sane-master
nixos/sane: allow to disable enabled-by-default plugins
2021-04-05 13:49:43 +02:00
Symphorien Gibol
c20cd1834f sane-backends: 1.0.30 -> 1.0.32
sane-backends-git: remove, it's not updated often enough to be useful
2021-03-21 11:07:14 +01:00
Symphorien Gibol
c64fb5000b nixos/sane: allow to disable enabled-by-default plugins
use case: disabling v4l plugin because I don't use my webcam as a
scanner.
2021-02-19 16:52:26 +01:00
Andreas Rammhold
6f7d8e5528
nixos/sane: bump the MaxConnections to a reasonable amount
Whenever I try to scan from another computer it has to establish >2
connections in order to succeed. With the connections being limited to 1
I can not scan any document.

This is also what other distributions ([Debian], [ArchLinux], …) have
done in one way or another.

[Debian]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850649#5
[ArchLinux]: no limit: 99cba454bb/trunk/saned.socket (L4)
2020-11-18 20:25:44 +01:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Silvan Mosberger
478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Ricardo Ardissone
0bae18fb55 sane service: mention the lp group for printer+scanners 2017-02-03 20:54:04 +03:00
Nikolay Amiantov
382047a135 sane service: support remote scanners 2016-11-20 19:09:03 +03:00
Nikolay Amiantov
65f9341370 sane service: add saned support 2016-11-20 19:09:02 +03:00
zimbatm
93a0306e79 sane module: add more documentation
Imported from https://nixos.org/wiki/Scanners
2016-02-25 19:36:46 +00:00
Tobias Geerinckx-Rice
99075fb402 saneBackends{,Git} -> sane-backends{,-git}
Fixes xsane evaluation.
2016-01-03 03:31:38 +01:00
Eelco Dolstra
89e983786a Manual: Remove store path references 2015-09-24 11:50:58 +02:00
Rickard Nilsson
94deea2035 nixos: Add option hardware.sane.configDir 2014-06-24 10:52:12 +02:00
Cillian de Róiste
74cd7cb3c8 sane: environment.variables -> environment.sessionVariables
See 13befa3979 for details
2014-06-22 14:38:45 +02:00
Rickard Nilsson
5bf076d99b sane: Make SANE_CONFIG_DIR overrideable 2014-05-30 10:18:39 +02:00
Thomas Tuegel
8df521bf0f sane: use mkSaneConfig to set system environment 2014-05-11 14:01:07 -05:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00