From 43cb1eb2f9b02356f130637dabcdc7fe10ee20fe Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 30 Nov 2022 16:11:13 +0100 Subject: nixos/cupsd: stop managing /run/cups directory The directory is already set up by cups.socket: managing it with RuntimeDirectory in cups.service is unnecesary and has the unwanted effect that upon stopping cupsd systemd will remove it. This includes the /run/cups/cups.sock socket, so it breaks socket activation. --- nixos/modules/services/printing/cupsd.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'nixos/modules/services/printing') diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index ae59dcc226de..009f0fb030f7 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -395,10 +395,7 @@ in ''} ''; - serviceConfig = { - PrivateTmp = true; - RuntimeDirectory = [ "cups" ]; - }; + serviceConfig.PrivateTmp = true; }; systemd.services.cups-browsed = mkIf avahiEnabled -- cgit 1.4.1 From 28034190def8d40c7cce31fb98960072a84a9a1a Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 7 Dec 2022 15:31:09 +0100 Subject: nixos/cupsd: fix /var/run/ warning in cups.socket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silence the systemd warning ListenStream= references a path below legacy directory /var/run/, updating /var/run/cups/cups.sock → /run/cups/cups.sock; please update the unit file accordingly by resetting the value coming from the upstream unit. --- nixos/modules/services/printing/cupsd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/services/printing') diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 009f0fb030f7..9ac89e057620 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -341,7 +341,7 @@ in systemd.sockets.cups = mkIf cfg.startWhenNeeded { wantedBy = [ "sockets.target" ]; - listenStreams = [ "/run/cups/cups.sock" ] + listenStreams = [ "" "/run/cups/cups.sock" ] ++ map (x: replaceStrings ["localhost"] ["127.0.0.1"] (removePrefix "*:" x)) cfg.listenAddresses; }; -- cgit 1.4.1