diff options
author | Luke Granger-Brown <git@lukegb.com> | 2021-10-14 14:54:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 14:54:08 +0100 |
commit | b4b663efc849d5bda282ac335e6a6cbe32591a12 (patch) | |
tree | f48da75821819caa7e9693ada719a9b2943c446d /nixos/modules/hardware | |
parent | 361dd2232bf6937ef88f3e11440d778dadb5b053 (diff) | |
parent | 2f8ae51da95306aea91b14b5f4636770087a4a21 (diff) | |
download | nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar.gz nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar.bz2 nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar.lz nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar.xz nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.tar.zst nixpkgs-b4b663efc849d5bda282ac335e6a6cbe32591a12.zip |
Merge pull request #132713 from ncfavier/cups
cups: 2.3.3 -> 2.3.3op2
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/printers.nix | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/nixos/modules/hardware/printers.nix b/nixos/modules/hardware/printers.nix index 7bab4f7038d..ef07542950b 100644 --- a/nixos/modules/hardware/printers.nix +++ b/nixos/modules/hardware/printers.nix @@ -116,19 +116,14 @@ in { description = "Ensure NixOS-configured CUPS printers"; wantedBy = [ "multi-user.target" ]; requires = [ cupsUnit ]; - # in contrast to cups.socket, for cups.service, this is actually not enough, - # as the cups service reports its activation before clients can actually interact with it. - # Because of this, commands like `lpinfo -v` will report a bad file descriptor - # due to the missing UNIX socket without sufficient sleep time. after = [ cupsUnit ]; serviceConfig = { Type = "oneshot"; + RemainAfterExit = true; }; - # sleep 10 is required to wait until cups.service is actually initialized and has created its UNIX socket file - script = (optionalString (!config.services.printing.startWhenNeeded) "sleep 10\n") - + (concatMapStringsSep "\n" ensurePrinter cfg.ensurePrinters) + script = concatMapStringsSep "\n" ensurePrinter cfg.ensurePrinters + optionalString (cfg.ensureDefaultPrinter != null) (ensureDefaultPrinter cfg.ensureDefaultPrinter); }; }; |