test redis
This commit is contained in:
@@ -88,6 +88,8 @@ in
|
||||
|
||||
radarr.enable = true;
|
||||
|
||||
redis.enable = true;
|
||||
|
||||
sabnzbd.enable = true;
|
||||
|
||||
sonarr.enable = true;
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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/puter
|
||||
./apps/radarr
|
||||
./apps/redis
|
||||
./apps/sabnzbd
|
||||
./apps/sonarr
|
||||
./apps/swag
|
||||
|
||||
Reference in New Issue
Block a user