about summary refs log tree commit diff
path: root/nixos/modules/services/printing
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2018-02-23 13:41:15 +0300
committerNikolay Amiantov <ab@fmap.me>2018-02-23 18:51:39 +0300
commit9c1c424e525b637560d91b99430b83cdaed24820 (patch)
treecc0d993cc7ded30df67c33468fbd906869c1c745 /nixos/modules/services/printing
parent998fdfdc94b14f49ea3e8042f2d1e74dd4945bcb (diff)
downloadnixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar.gz
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar.bz2
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar.lz
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar.xz
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.tar.zst
nixlib-9c1c424e525b637560d91b99430b83cdaed24820.zip
cups service: fix client sockets
Use systemd to create the directory for UNIX socket. Also use localhost instead
of 127.0.0.1 as is done in default cupsd.conf so that IPv6 is enabled when
available.
Diffstat (limited to 'nixos/modules/services/printing')
-rw-r--r--nixos/modules/services/printing/cupsd.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
index 4c7f58d1d8bc..ecab8cfc7df9 100644
--- a/nixos/modules/services/printing/cupsd.nix
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -124,7 +124,7 @@ in
 
       listenAddresses = mkOption {
         type = types.listOf types.str;
-        default = [ "127.0.0.1:631" ];
+        default = [ "localhost:631" ];
         example = [ "*:631" ];
         description = ''
           A list of addresses and ports on which to listen.
@@ -321,7 +321,10 @@ in
             ''}
           '';
 
-          serviceConfig.PrivateTmp = true;
+          serviceConfig = {
+            PrivateTmp = true;
+            RuntimeDirectory = [ "cups" ];
+          };
       };
 
     systemd.services.cups-browsed = mkIf avahiEnabled