about summary refs log tree commit diff
path: root/nixos/tests/printing.nix
diff options
context:
space:
mode:
authormatthewcroughan <matt@croughan.sh>2022-10-17 22:59:24 +0100
committermatthewcroughan <matt@croughan.sh>2022-10-17 22:59:24 +0100
commita99ab1fbc16dfdbe4922aa30357886fd5e09e7a0 (patch)
tree2c15ef6284ae01f6470fef6f2799c3a20ed5fd4d /nixos/tests/printing.nix
parent3bcc8e1ac7ec6040219acc8da4cda6df394cddb1 (diff)
nixos/printing: add services.printing.stateless option
This will remove all state directories related to CUPS on startup, which
is particularly useful for guaranteeing that printer discovery works
more reliably on some networks, since CUPS will no longer be able to
store state that effects the next run of the service, such as old
printer names and mDNS information.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'nixos/tests/printing.nix')
-rw-r--r--nixos/tests/printing.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix
index 6338fd8d8ac10..cfebe232d92a0 100644
--- a/nixos/tests/printing.nix
+++ b/nixos/tests/printing.nix
@@ -4,6 +4,7 @@ import ./make-test-python.nix ({pkgs, ... }:
 let
   printingServer = startWhenNeeded: {
     services.printing.enable = true;
+    services.printing.stateless = true;
     services.printing.startWhenNeeded = startWhenNeeded;
     services.printing.listenAddresses = [ "*:631" ];
     services.printing.defaultShared = true;