66 lines
1.6 KiB
Nix
66 lines
1.6 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
options.settings.containers.lidarr = {
|
|
enable = lib.mkEnableOption "enable lidarr arion container";
|
|
};
|
|
|
|
config = lib.mkIf config.settings.containers.lidarr.enable {
|
|
containers.lidarr = {
|
|
autoStart = true;
|
|
forwardPorts = [
|
|
{
|
|
containerPort = 8686;
|
|
hostPort = 8686;
|
|
}
|
|
];
|
|
|
|
bindMounts = {
|
|
"/data" = {
|
|
hostPath = "/data";
|
|
};
|
|
"/var/lib/lidarr/.config/Lidarr" = {
|
|
hostPath = "/config/lidarr";
|
|
};
|
|
};
|
|
config =
|
|
{ ... }:
|
|
{
|
|
services.lidarr.enable = true;
|
|
services.lidarr.openFirewall = true;
|
|
};
|
|
};
|
|
|
|
# virtualisation.arion.projects.lidarr = {
|
|
# settings = {
|
|
# project.name = "lidarr";
|
|
# services.lidarr = {
|
|
# service.useHostStore = true;
|
|
# nixos.useSystemd = true;
|
|
# nixos.configuration =
|
|
# { lib, ... }:
|
|
# {
|
|
# boot.isContainer = true;
|
|
# boot.tmp.useTmpfs = true;
|
|
# networking.useDHCP = false;
|
|
# services.nscd.enable = false;
|
|
# system.nssModules = lib.mkForce [ ];
|
|
|
|
# services.lidarr.enable = true;
|
|
# services.lidarr.openFirewall = true;
|
|
# services.lidarr.dataDir = "/config";
|
|
# services.lidarr.user = "root";
|
|
# };
|
|
# service.ports = [ "8686:8686" ];
|
|
# service.volumes = [
|
|
# "/config/lidarr:/config"
|
|
# "/data:/data"
|
|
# ];
|
|
# };
|
|
# };
|
|
# };
|
|
};
|
|
}
|