test redis

This commit is contained in:
mjallen18
2024-07-22 10:20:12 -05:00
parent 42795b6e10
commit b2ffed3095
5 changed files with 57 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ in
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
REDIS_HOST = "10.0.1.18";
REDIS_PORT = "6379";
REDIS_HOST_PASSWORD = "BogieDudie1";
};
};
};

View File

@@ -0,0 +1,24 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.redis;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
cmd = cfg.cmd;
ports = [
"6379:6379"
];
};
};
}

View File

@@ -0,0 +1,27 @@
{ lib, ... }:
with lib;
{
options.nas-apps.redis = {
enable = mkEnableOption "redis docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
name = mkOption {
type = types.str;
default = "redis";
};
image = mkOption {
type = types.str;
default = "redis";
};
cmd = mkOption {
type = types.str;
default = "redis-server --requirepass BogieDudie1";
};
};
}

View File

@@ -19,6 +19,7 @@
./apps/orca-slicer
./apps/puter
./apps/radarr
./apps/redis
./apps/sabnzbd
./apps/sonarr
./apps/swag