From 1767610c7ce98786427d8fa85ef82152db410f3a Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Tue, 15 Oct 2024 08:25:08 +0700 Subject: [PATCH] flatpak: added support for redis --- home/programs/default.nix | 1 + home/programs/redis.nix | 12 ++++++++++++ options/flatpak.nix | 1 + options/services.nix | 4 ++++ profiles/castle.nix | 1 + system/flatpak/default.nix | 3 ++- 6 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 home/programs/redis.nix diff --git a/home/programs/default.nix b/home/programs/default.nix index 5c7c70a..22fb076 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -23,6 +23,7 @@ ./nnn.nix ./node.nix ./obsidian.nix + ./redis.nix ./slack.nix ./spotify.nix ./starship.nix diff --git a/home/programs/redis.nix b/home/programs/redis.nix new file mode 100644 index 0000000..303b409 --- /dev/null +++ b/home/programs/redis.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.profile.services.redis; + inherit (lib) mkIf; +in +lib.mkMerge [ + (mkIf cfg.client.cli.enable { + home.packages = [ + pkgs.redis + ]; + }) +] diff --git a/options/flatpak.nix b/options/flatpak.nix index bef1afa..bbe7005 100644 --- a/options/flatpak.nix +++ b/options/flatpak.nix @@ -6,5 +6,6 @@ in options.profile.flatpak = { enable = mkEnableOption "flatpak"; zen-browser.enable = mkEnableOption "zen-browser"; + redisinsight.enable = mkEnableOption "redisinsight"; }; } diff --git a/options/services.nix b/options/services.nix index 44d91a8..95c3372 100644 --- a/options/services.nix +++ b/options/services.nix @@ -35,6 +35,10 @@ in }; }; + redis = { + client.cli.enable = mkEnableOption "redis cli client"; + }; + couchdb.enable = mkEnableOption "couchdb"; telemetry = { diff --git a/profiles/castle.nix b/profiles/castle.nix index b0d5b05..8a7e05f 100644 --- a/profiles/castle.nix +++ b/profiles/castle.nix @@ -82,6 +82,7 @@ in flatpak = { enable = true; zen-browser.enable = true; + redisinsight.enable = true; }; microsoft-edge.enable = true; diff --git a/system/flatpak/default.nix b/system/flatpak/default.nix index d5c9cbb..53a6dd4 100644 --- a/system/flatpak/default.nix +++ b/system/flatpak/default.nix @@ -13,7 +13,8 @@ in onCalendar = "weekly"; # Default value }; packages = [ ] - ++ optional cfg.zen-browser.enable "io.github.zen_browser.zen"; + ++ optional cfg.zen-browser.enable "io.github.zen_browser.zen" + ++ optional cfg.redisinsight.enable "com.redis.RedisInsight"; }; }; }