Skip to content

Commit

Permalink
nixos/redis: add migration path to redict or sspl-redis
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-re-ka committed Mar 30, 2024
1 parent 47c72c5 commit aed7744
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nixos/modules/services/databases/redis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ in {
options = {

services.redis = {
package = mkPackageOption pkgs "redis" { };
package = mkPackageOption pkgs "redict" { };

vmOverCommit = mkEnableOption (lib.mdDoc ''
setting of vm.overcommit_memory to 1
Expand Down Expand Up @@ -304,6 +304,14 @@ in {

config = mkIf (enabledServers != {}) {

warnings = mkIf (cfg.enable && cfg.package.pname == "redict") [
''
The license of the Redis package has changed to SSPL. You have two options:
- Replace `services.redis` with `services.redict` to switch to https://redict.io, which will continue development under a LGPL-3-only license
- confirm you want to use the unfree redis going forward with `services.redis.package = pkgs.redis;`
''
];

assertions = attrValues (mapAttrs (name: conf: {
assertion = conf.requirePass != null -> conf.requirePassFile == null;
message = ''
Expand Down

0 comments on commit aed7744

Please sign in to comment.