test redis
This commit is contained in:
@@ -88,6 +88,8 @@ in
|
|||||||
|
|
||||||
radarr.enable = true;
|
radarr.enable = true;
|
||||||
|
|
||||||
|
redis.enable = true;
|
||||||
|
|
||||||
sabnzbd.enable = true;
|
sabnzbd.enable = true;
|
||||||
|
|
||||||
sonarr.enable = true;
|
sonarr.enable = true;
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ in
|
|||||||
PUID = cfg.puid;
|
PUID = cfg.puid;
|
||||||
PGID = cfg.pgid;
|
PGID = cfg.pgid;
|
||||||
TZ = cfg.timeZone;
|
TZ = cfg.timeZone;
|
||||||
|
REDIS_HOST = "10.0.1.18";
|
||||||
|
REDIS_PORT = "6379";
|
||||||
|
REDIS_HOST_PASSWORD = "BogieDudie1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
24
modules/apps/redis/default.nix
Normal file
24
modules/apps/redis/default.nix
Normal 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/apps/redis/options.nix
Normal file
27
modules/apps/redis/options.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
./apps/orca-slicer
|
./apps/orca-slicer
|
||||||
./apps/puter
|
./apps/puter
|
||||||
./apps/radarr
|
./apps/radarr
|
||||||
|
./apps/redis
|
||||||
./apps/sabnzbd
|
./apps/sabnzbd
|
||||||
./apps/sonarr
|
./apps/sonarr
|
||||||
./apps/swag
|
./apps/swag
|
||||||
|
|||||||
Reference in New Issue
Block a user