From 6a22ce0edf4c879e00f6fa195fbb63ed854cda00 Mon Sep 17 00:00:00 2001 From: nyanotech Date: Sat, 17 Apr 2021 12:33:31 +0000 Subject: [PATCH] nixos/printers: fix ensureDefaultPrinter `lpoptions -d` sets the default printer *for this user*, while `lpadmin -d` sets the system-wide default printer. --- nixos/modules/hardware/printers.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/hardware/printers.nix b/nixos/modules/hardware/printers.nix index 752de41f26d..c587076dcd1 100644 --- a/nixos/modules/hardware/printers.nix +++ b/nixos/modules/hardware/printers.nix @@ -15,7 +15,7 @@ let ${ppdOptionsString p.ppdOptions} ''; ensureDefaultPrinter = name: '' - ${pkgs.cups}/bin/lpoptions -d '${name}' + ${pkgs.cups}/bin/lpadmin -d '${name}' ''; # "graph but not # or /" can't be implemented as regex alone due to missing lookahead support