nixos/cups: Fix Unable to encrypt connection:

Unable to create server credentials
by creating /var/lib/cups/ssl directory.
This commit is contained in:
Florian Jacob 2019-02-10 12:48:32 +01:00
parent 482c0440ac
commit 33b3272692
2 changed files with 6 additions and 0 deletions

View file

@ -316,6 +316,10 @@ in
mkdir -m 0755 -p ${cfg.tempDir}
mkdir -m 0755 -p /var/lib/cups
# While cups will automatically create self-signed certificates if accessed via TLS,
# this directory to store the certificates needs to be created manually.
mkdir -m 0700 -p /var/lib/cups/ssl
# Backwards compatibility
if [ ! -L /etc/cups ]; then
mv /etc/cups/* /var/lib/cups

View file

@ -39,6 +39,8 @@ import ./make-test.nix ({pkgs, ... }: {
$client->waitForUnit("cups.service");
$client->sleep(10); # wait until cups is fully initialized
$client->succeed("lpstat -r") =~ /scheduler is running/ or die;
# check local encrypted connections work without error
$client->succeed("lpstat -E -r") =~ /scheduler is running/ or die;
# Test that UNIX socket is used for connections.
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
# Test that HTTP server is available too.