summary refs log tree commit diff
diff options
context:
space:
mode:
authornyanotech <nyanotechnology@gmail.com>2021-04-17 12:33:31 +0000
committernyanotech <nyanotechnology@gmail.com>2021-04-17 12:33:31 +0000
commit6a22ce0edf4c879e00f6fa195fbb63ed854cda00 (patch)
tree1af57bdca4c541d6793de0f6acc8ccac2e39f8c9
parentc1c617ff8dcb42c05e4e8a20ddc0dde1a50b3dd3 (diff)
downloadnixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar.gz
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar.bz2
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar.lz
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar.xz
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.tar.zst
nixpkgs-6a22ce0edf4c879e00f6fa195fbb63ed854cda00.zip
nixos/printers: fix ensureDefaultPrinter
  `lpoptions -d` sets the default printer *for this user*, while `lpadmin -d`
  sets the system-wide default printer.
-rw-r--r--nixos/modules/hardware/printers.nix2
1 files changed, 1 insertions, 1 deletions
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