lol

nixos/redis: simplify

figsoda d65639ce dfff1a2b

+3 -7
+3 -7
nixos/modules/services/databases/redis.nix
··· 67 67 ''); 68 68 69 69 servers = mkOption { 70 - type = with types; attrsOf (submodule ({config, name, ...}@args: { 70 + type = with types; attrsOf (submodule ({ config, name, ... }: { 71 71 options = { 72 72 enable = mkEnableOption (lib.mdDoc '' 73 73 Redis server. ··· 271 271 }; 272 272 config.settings = mkMerge [ 273 273 { 274 - port = config.port; 274 + inherit (config) port logfile databases maxclients appendOnly; 275 275 daemonize = false; 276 276 supervised = "systemd"; 277 277 loglevel = config.logLevel; 278 - logfile = config.logfile; 279 278 syslog-enabled = config.syslog; 280 - databases = config.databases; 281 - maxclients = config.maxclients; 282 279 save = if config.save == [] 283 280 then ''""'' # Disable saving with `save = ""` 284 281 else map ··· 286 283 config.save; 287 284 dbfilename = "dump.rdb"; 288 285 dir = "/var/lib/${redisName name}"; 289 - appendOnly = config.appendOnly; 290 286 appendfsync = config.appendFsync; 291 287 slowlog-log-slower-than = config.slowLogLogSlowerThan; 292 288 slowlog-max-len = config.slowLogMaxLen; 293 289 } 294 - (mkIf (config.bind != null) { bind = config.bind; }) 290 + (mkIf (config.bind != null) { inherit (config) bind; }) 295 291 (mkIf (config.unixSocket != null) { 296 292 unixsocket = config.unixSocket; 297 293 unixsocketperm = toString config.unixSocketPerm;