2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-13 01:50:53 +00:00
|
|
|
with lib; let
|
2024-10-06 15:16:52 +00:00
|
|
|
cfg = config.custom.containers.redlib;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
2024-10-06 15:16:52 +00:00
|
|
|
options.custom.containers.redlib.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
#?? arion-redlib pull
|
|
|
|
environment.shellAliases.arion-redlib = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.redlib.settings.out.dockerComposeYaml}";
|
|
|
|
|
2024-10-08 23:23:50 +00:00
|
|
|
virtualisation.arion.projects.redlib.settings.services = {
|
|
|
|
redlib.service = {
|
|
|
|
container_name = "redlib";
|
|
|
|
image = "quay.io/redlib/redlib:latest";
|
|
|
|
ports = ["127.0.0.1:8888:8080"];
|
|
|
|
restart = "unless-stopped";
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-10-08 23:23:50 +00:00
|
|
|
environment = {
|
|
|
|
REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on";
|
|
|
|
REDLIB_DEFAULT_SHOW_NSFW = "on";
|
|
|
|
REDLIB_DEFAULT_THEME = "dracula";
|
|
|
|
REDLIB_DEFAULT_USE_HLS = "on";
|
|
|
|
REDLIB_DEFAULT_WIDE = "off";
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|