summary refs log tree commit diff
path: root/nixos/modules/services/databases/redis.nix
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2022-11-30 17:38:52 -0500
committerfigsoda <figsoda@pm.me>2022-11-30 17:38:52 -0500
commitd65639ce40d4f26c362732d81e1f27fb88d6c9e5 (patch)
tree69fab49caaa052d29ffcea7fd6e6328daf4477a7 /nixos/modules/services/databases/redis.nix
parentdfff1a2b83d3cd795a3178a3142544eac7026153 (diff)
downloadnixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar.gz
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar.bz2
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar.lz
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar.xz
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.tar.zst
nixpkgs-d65639ce40d4f26c362732d81e1f27fb88d6c9e5.zip
nixos/redis: simplify
Diffstat (limited to 'nixos/modules/services/databases/redis.nix')
-rw-r--r--nixos/modules/services/databases/redis.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 95c0afb8f83..1464f4487e3 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -67,7 +67,7 @@ in {
       '');
 
       servers = mkOption {
-        type = with types; attrsOf (submodule ({config, name, ...}@args: {
+        type = with types; attrsOf (submodule ({ config, name, ... }: {
           options = {
             enable = mkEnableOption (lib.mdDoc ''
               Redis server.
@@ -271,14 +271,11 @@ in {
           };
           config.settings = mkMerge [
             {
-              port = config.port;
+              inherit (config) port logfile databases maxclients appendOnly;
               daemonize = false;
               supervised = "systemd";
               loglevel = config.logLevel;
-              logfile = config.logfile;
               syslog-enabled = config.syslog;
-              databases = config.databases;
-              maxclients = config.maxclients;
               save = if config.save == []
                 then ''""'' # Disable saving with `save = ""`
                 else map
@@ -286,12 +283,11 @@ in {
                   config.save;
               dbfilename = "dump.rdb";
               dir = "/var/lib/${redisName name}";
-              appendOnly = config.appendOnly;
               appendfsync = config.appendFsync;
               slowlog-log-slower-than = config.slowLogLogSlowerThan;
               slowlog-max-len = config.slowLogMaxLen;
             }
-            (mkIf (config.bind != null) { bind = config.bind; })
+            (mkIf (config.bind != null) { inherit (config) bind; })
             (mkIf (config.unixSocket != null) {
               unixsocket = config.unixSocket;
               unixsocketperm = toString config.unixSocketPerm;