diff options
Diffstat (limited to 'modules/private/databases')
-rw-r--r-- | modules/private/databases/redis.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/private/databases/redis.nix b/modules/private/databases/redis.nix index 4602510..bc6460f 100644 --- a/modules/private/databases/redis.nix +++ b/modules/private/databases/redis.nix | |||
@@ -41,6 +41,7 @@ in { | |||
41 | maxclients 1024 | 41 | maxclients 1024 |
42 | ''; | 42 | ''; |
43 | }; | 43 | }; |
44 | systemd.services.redis.serviceConfig.Slice = "redis.slice"; | ||
44 | 45 | ||
45 | services.spiped = { | 46 | services.spiped = { |
46 | enable = true; | 47 | enable = true; |
@@ -57,8 +58,9 @@ in { | |||
57 | wantedBy = [ "multi-user.target" ]; | 58 | wantedBy = [ "multi-user.target" ]; |
58 | 59 | ||
59 | serviceConfig = { | 60 | serviceConfig = { |
60 | Restart = "always"; | 61 | Slice = "redis.slice"; |
61 | User = "spiped"; | 62 | Restart = "always"; |
63 | User = "spiped"; | ||
62 | PermissionsStartOnly = true; | 64 | PermissionsStartOnly = true; |
63 | SupplementaryGroups = "keys"; | 65 | SupplementaryGroups = "keys"; |
64 | }; | 66 | }; |
@@ -108,12 +110,17 @@ in { | |||
108 | } | 110 | } |
109 | ]; | 111 | ]; |
110 | 112 | ||
113 | systemd.slices.redis = { | ||
114 | description = "Redis slice"; | ||
115 | }; | ||
116 | |||
111 | systemd.services.predixy = { | 117 | systemd.services.predixy = { |
112 | description = "Redis proxy"; | 118 | description = "Redis proxy"; |
113 | wantedBy = [ "multi-user.target" ]; | 119 | wantedBy = [ "multi-user.target" ]; |
114 | after = [ "redis.service" ]; | 120 | after = [ "redis.service" ]; |
115 | 121 | ||
116 | serviceConfig = { | 122 | serviceConfig = { |
123 | Slice = "redis.slice"; | ||
117 | User = "redis"; | 124 | User = "redis"; |
118 | Group = "redis"; | 125 | Group = "redis"; |
119 | SupplementaryGroups = "keys"; | 126 | SupplementaryGroups = "keys"; |