]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/databases/redis.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / databases / redis.nix
index 693f40261627d7b1cdba473446de86257c823525..46025105c64b4318a3a9332508cb5c118d48985f 100644 (file)
@@ -1,4 +1,4 @@
-{ lib, config, pkgs, myconfig, ... }:
+{ lib, config, pkgs, ... }:
 let
     cfg = config.myServices.databases.redis;
 in {
@@ -17,16 +17,6 @@ in {
         '';
     };
     # Output variables
-    systemdRuntimeDirectory = lib.mkOption {
-      type = lib.types.str;
-      # Use ReadWritePaths= instead if socketsDir is outside of /run
-      default = assert lib.strings.hasPrefix "/run/" cfg.socketsDir;
-        lib.strings.removePrefix "/run/" cfg.socketsDir;
-      description = ''
-      Adjusted redis sockets directory for systemd
-      '';
-      readOnly = true;
-    };
     sockets = lib.mkOption {
       type = lib.types.attrsOf lib.types.path;
       default = {
@@ -51,7 +41,6 @@ in {
         maxclients 1024
         '';
     };
-    systemd.services.redis.serviceConfig.RuntimeDirectory = cfg.systemdRuntimeDirectory;
 
     services.spiped = {
       enable = true;
@@ -96,7 +85,7 @@ in {
           WorkerThreads 1
 
           Authority {
-              Auth "${myconfig.env.databases.redis.predixy.read}" {
+              Auth "${config.myEnv.databases.redis.predixy.read}" {
                   Mode read
               }
           }
@@ -105,7 +94,7 @@ in {
             Databases 16
             RefreshMethod fixed
             Group shard001 {
-              + ${myconfig.env.databases.redis.socket}
+              + ${config.myEnv.databases.redis.socket}
             }
           }
           '';
@@ -115,7 +104,7 @@ in {
         user = "spiped";
         group = "spiped";
         permissions = "0400";
-        text = myconfig.env.databases.redis.spiped_key;
+        text = config.myEnv.databases.redis.spiped_key;
       }
     ];