summary refs log tree commit diff
path: root/nixos/modules/misc/ids.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-01-03 12:10:45 +0100
committerJörg Thalheim <joerg@thalheim.io>2018-01-03 12:33:36 +0100
commitc9c8a2c5b3b72668656add5409853db8e15ea99d (patch)
tree0aa282eca08700f8ac99bc5a56a1dcbd3249b774 /nixos/modules/misc/ids.nix
parenteb6db32d015397f24bd623a60e7e53e37ffe2258 (diff)
downloadnixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar.gz
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar.bz2
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar.lz
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar.xz
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.tar.zst
nixlib-c9c8a2c5b3b72668656add5409853db8e15ea99d.zip
nixos/memcached: make unix sockets usuable
before:
  - /var/run/memcached is a bad default for a socket path, since its
    parent directory must be writeable by memcached.
  - Socket directory was not created by the module itself -> this was
    left as a burden to the user?
  - Having a static uid with a dynamic user name is not very useful.

after:
  - Replace services.memcached.socket by a boolean flag. This simplifies
    our code, since we do not have to check if the user specifies a
    path with a parent directory that should be owned by memcached
    (/run/memcached/memcached.sock -> /run/memcached).
  - Remove fixed uid/gid allocation. The only file ever owned by the
    daemon is the socket that will be recreated on every start.
    Therefore user and group ids do not need to be static.
  - only create the memcached user, if the user has not specified a
    different one. The major use case for changing option is to allow
    existing services (such as php-fpm) opening the local unix socket.
    If we would unconditionally create a user that option would be
    useless.
Diffstat (limited to 'nixos/modules/misc/ids.nix')
-rw-r--r--nixos/modules/misc/ids.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 579a3f6393ce..d0cd32cb9040 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -197,7 +197,7 @@
       #input = 174; # unused
       sddm = 175;
       tss = 176;
-      memcached = 177;
+      #memcached = 177; removed 2018-01-03
       ntp = 179;
       zabbix = 180;
       redis = 181;
@@ -475,7 +475,7 @@
       input = 174;
       sddm = 175;
       tss = 176;
-      #memcached = 177; # unused
+      #memcached = 177; # unused, removed 2018-01-03
       #ntp = 179; # unused
       #zabbix = 180; # unused
       #redis = 181; # unused