Commit Graph

59 Commits

Author SHA1 Message Date
Symphorien Gibol
a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Florian Jacob
33b3272692 nixos/cups: Fix Unable to encrypt connection:
Unable to create server credentials
by creating /var/lib/cups/ssl directory.
2019-02-14 20:43:26 +01:00
obadz
6fca3c5700 cups-googlecloudprint: init at 20160502 2018-10-11 09:19:58 +01:00
Johannes Frankenau
d81f819db3 nixos/cupsd: add option to start when needed 2018-07-14 23:39:43 +02:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Ben Gamari
192352ff2f nixos/cupsd: Introduce services.printing.logLevel option
Previously we indirectly suggested that the user use
services.printing.extraConf to set this, but this doesn't work with the
default merge ordering. Fix this by making it an independent option.
Fixes #39611.
2018-04-27 16:41:49 +00:00
Nikolay Amiantov
9c1c424e52 cups service: fix client sockets
Use systemd to create the directory for UNIX socket. Also use localhost instead
of 127.0.0.1 as is done in default cupsd.conf so that IPv6 is enabled when
available.
2018-02-23 18:51:39 +03:00
Michael Weiss
ea23f8bb07 cups service: Automatically detect Gutenprint in drivers
Additional CUPS drivers can be added via "services.printing.drivers" but
Gutenprint was an exception. It was possible to add a Gutenprint
derivation to that list and it would work at first but unlike the other
drivers Gutenprint requires a script to be run after each update or any
attempt to print something would simply fail and an error would show up
in the jobs queue (http://localhost:631/jobs/):
"The PPD version (5.2.11) is not compatible with Gutenprint 5.2.13.
Please run
`/nix/store/7762kpyhfkcgmr3q81v1bbyy0bjhym80-gutenprint-5.2.13/sbin/cups-genppdupdate'
as administrator."
This is due to state in "/var/lib/cups/ppd" and one would need to run
"/nix/store/.../bin/cups-genppdupdate -p /var/lib/cups/ppd" manually.
The alternative was to enable the following option:
"services.printing.gutenprint" but this had two disadvantages:
1) It is an exception that one could be unaware of or that could
potentially cause some confusion.
2) One couldn't use a customized Gutenprint derivation in
"services.printing.drivers" but would instead have to overwrite
"pkgs.gutenprint".

This new approach simply detects a Gutenprint derivation in
"services.printing.gutenprint" by checking if the meta set of a
derivation contains "isGutenprint = true". Therefore no special
exception for Gutenprint would be required and it could easily be
applied to other drivers if they would require such a script to be run.
2017-08-29 05:25:12 +04:00
Benno Fünfstück
99fbd867ef Merge pull request #27031 from jerith666/cnijfilter-2-80
cnijfilter: init at 2.80
2017-07-18 14:37:32 +02:00
Matt McHenry
67d02cd60a cnijfilter: init at 2.80
this driver reads support files from lib/bjlib as well as lib/cups,
which is why the path in cupsd.nix is tweaked
2017-07-17 07:32:23 -04:00
Jörg Thalheim
731917a800
cups: mount private /tmp
printer driver and wrapper are often not written with security in mind.

While reviewing https://github.com/NixOS/nixpkgs/pull/25654 I found
a symlink-race vulnerability within the wrapper code, when writing
unique files in /tmp.
I expect this script to be reused in other models as well
as similar vulnerabilities in the code of other vendors. Therefore
I propose to make /tmp of cups.service private so that only processes
with the same privileges are able to access these files.
2017-05-10 18:03:42 +01:00
Vladimír Čunát
50fadc8b18
cups: split the $lib output
This saves > 10 MB from most closures.
Printing test succeeds on x86_64-linux.
2017-03-12 18:36:30 +01:00
Matt McHenry
05fb82732c use symlink to ensure cupsd.conf PATH always points to a valid store path
even if cups rewrites its config file due to config changes made through
its web-based management UI, we need to keep the PATH pointing to
currently-live nix store directories.  fixes #20806.
2016-12-13 21:35:56 -05:00
Bjørn Forsman
fbf9162cbb treewide: cups_filters -> cups-filters 2016-08-25 17:48:35 +02:00
Joachim Fasting
9de93be6cd
cups service: use cups.out everywhere
Seeing as the dev output is the default, we probably want cups.out
everywhere.
2016-04-16 21:26:33 +02:00
Joachim Fasting
47330b1732
cups service: fix missing upstream systemd units caused by output splitting
Need to pass `cups.out` to `systemd.packages`, lest we end up with an invalid
generated unit containing only directives set in the service module.

This patch gives us a valid cups.service unit but, vexingly, does not fix the
test failure at NixOS/nixpkgs#14748
2016-04-16 09:47:17 +02:00
Vladimír Čunát
ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Nikolay Amiantov
851af5e888 cups service: fix gutenprint update when there's no printers 2016-03-15 21:46:33 +03:00
Profpatsch
d37729f4b8 modules/cupsd: clarify how to set gutenprint 2016-03-08 16:39:17 +01:00
Vladimír Čunát
09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Nikolay Amiantov
c88a06a860 cups service: set path for cups-genppdupdate 2016-02-26 18:27:41 +03:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Tuomas Tynkkynen
dc8e939dbc treewide: Mass replace 'cups}/lib' to refer the 'out' output 2016-01-24 10:03:33 +02:00
Nikolay Amiantov
47017474fd cupsd service: move root directory to /var/lib/cups 2016-01-17 15:50:40 +03:00
Nikolay Amiantov
c311901810 cupsd service: don't allow overriding necessary configuration options 2016-01-17 15:50:40 +03:00
Nikolay Amiantov
d93f866f55 cupsd service: add gutenprint support 2016-01-17 15:50:40 +03:00
Nikolay Amiantov
8377b4e5d6 cupsd service: move all default drivers to the bindir directly 2016-01-17 15:50:40 +03:00
Nikolay Amiantov
06865208e8 cupsd service: use cups-pk-helper is policykit is enabled 2016-01-17 15:50:40 +03:00
Thomas Strobel
2b9b9dc611 nixos cups-browsed: better link to avahi-daemon
Link cups browsed daemon to reload or exit with the avahi-daemon.
2015-12-21 18:20:52 +01:00
Bjørn Forsman
7d414a0646 nixos: add services.printing.snmpConf option
And set the default value to "Address @LOCAL". This change is needed to
find printers at my workplace (with "lpinfo -v" or the
"system-config-printer" GUI). Ubuntu 14.04 also has this as default.

snmp.conf does not seem to be needed in restartTriggers, because it is
not the cups daemon itself that reads it, but some helper programs that
it spawns on demand.
2015-08-13 22:05:09 +02:00
Eelco Dolstra
c9e46da86b cups-browsed: Only enable if avahi is enabled
This gets rid of

  systemd[1]: Cannot add dependency job for unit avahi-daemon.service, ignoring: Unit avahi-daemon.service failed to load: No such file or directory.
2015-08-04 16:41:18 +02:00
Jascha Geerds
19dbe42aeb Revert "cups: Rename "browsing" config option to "advertise""
This reverts commit 48e65cec4e.
2015-05-10 20:47:50 +02:00
Jascha Geerds
48e65cec4e cups: Rename "browsing" config option to "advertise" 2015-05-10 12:41:21 +02:00
Jascha Geerds
2cc8d15653 cups: Add defaultShared, browsing and webInterace config option 2015-05-10 12:41:21 +02:00
Jascha Geerds
3710dbec05 cups: Remove deprecated config options from cupsd.conf 2015-05-10 12:41:20 +02:00
Jascha Geerds
4ac95ab328 cups: Use systemd files provided by CUPS 2015-05-10 12:41:20 +02:00
Kirill Elagin
356810b178 cupsd: rename cupsd.service to cups.service 2015-03-12 09:00:56 +03:00
Damien Cassou
a7024cb4b4 Create a nixos module for cups-browsed 2015-01-16 14:10:57 +01:00
Eelco Dolstra
be0e73b938 cups: Build with SERVERROOT set to /etc/cups 2014-12-16 18:23:41 +01:00
Eelco Dolstra
dc6c8b9714 cupsd.nix: Clean up environment.etc 2014-12-16 18:23:41 +01:00
tv@shackspace.de
b71f3c4315 nixos/cupsd: use cups-files.conf 2014-12-16 18:23:40 +01:00
Domen Kožar
28a1af6e06 fix printing test 2014-11-27 20:01:18 +01:00
aszlig
cc28e819e4
nixos/cupsd: Ignore collisions in cups-progs.
There currently are collisions between the main CUPS package and the
filters package, which are:

  * $storepath/share/cups/banners/classified
  * $storepath/share/cups/banners/confidential
  * $storepath/share/cups/banners/secret
  * $storepath/share/cups/banners/standard
  * $storepath/share/cups/banners/topsecret
  * $storepath/share/cups/banners/unclassified
  * $storepath/share/cups/data/testprint

And they actually have different content, so let's ignore those for now
until we have a better fix.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-11-24 17:40:03 +01:00
Domen Kožar
23567ac200 cups-pdf-filter -> cups-filters, enable by default for cups 2014-11-23 17:51:55 +01:00
Michael Raskin
48a1b59f6a Remove cups_pdf_filter from the default set - adding to default set is easier than removing... 2014-11-23 16:27:28 +03:00
Michael Raskin
ba77c90161 Revert "cups: update package"
This reverts commit aa548af5a5.
2014-11-15 17:00:15 +03:00
Michael Raskin
d86c047f9c Revert "cups-filters: add package"
This reverts commit f7ba33de56.
2014-11-15 16:59:58 +03:00
Nikolay Amiantov
f7ba33de56 cups-filters: add package 2014-11-14 13:51:26 +03:00
Nikolay Amiantov
aa548af5a5 cups: update package 2014-11-14 13:51:26 +03:00
Edward Tjörnhammar
f28d8c2dc4 CUPS system wide client configuration. 2014-08-20 18:48:42 +02:00