nix fmt with "nixfmt-rfc-style"
This commit is contained in:
parent
4a39b2cbfd
commit
eb9f742b1e
26 changed files with 460 additions and 267 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.download-pod-old;
|
||||
in
|
||||
|
|
@ -37,103 +42,113 @@ in
|
|||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
{
|
||||
podman.enable = true;
|
||||
config = lib.mkIf cfg.enable {
|
||||
podman.enable = true;
|
||||
|
||||
systemd.services.pod-download = {
|
||||
description = "Start podman 'download' pod";
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
requiredBy = [
|
||||
"podman-jackett.service"
|
||||
"podman-radarr.service"
|
||||
"podman-sabnzbd.service"
|
||||
"podman-sonarr.service"
|
||||
systemd.services.pod-download = {
|
||||
description = "Start podman 'download' pod";
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
requiredBy = [
|
||||
"podman-jackett.service"
|
||||
"podman-radarr.service"
|
||||
"podman-sabnzbd.service"
|
||||
"podman-sonarr.service"
|
||||
];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = "/run/containers";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "-${pkgs.podman}/bin/podman pod create -p 9117:9117 -p 7878:7878 -p 8080:8080 -p 8989:8989 download";
|
||||
}; # -p 9117:9117 -p 7878:7878 -p 8080:8080 -p 8989:8989
|
||||
#--share cgroup,ipc,uts
|
||||
path = [ pkgs.podman ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
jackett = {
|
||||
image = "linuxserver/jackett";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "9117:9117" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [
|
||||
"jackett_config:/config"
|
||||
"${cfg.dataDir}:/data"
|
||||
];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = "/run/containers";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "-${pkgs.podman}/bin/podman pod create -p 9117:9117 -p 7878:7878 -p 8080:8080 -p 8989:8989 download";
|
||||
}; # -p 9117:9117 -p 7878:7878 -p 8080:8080 -p 8989:8989
|
||||
#--share cgroup,ipc,uts
|
||||
path = [ pkgs.podman ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
jackett = {
|
||||
image = "linuxserver/jackett";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "9117:9117" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [ "jackett_config:/config" "${cfg.dataDir}:/data" ];
|
||||
};
|
||||
|
||||
radarr = {
|
||||
image = "linuxserver/radarr";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "7878:7878" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [ "radarr_config:/config" "${cfg.dataDir}:/data" ];
|
||||
};
|
||||
|
||||
sabnzbd = {
|
||||
image = "linuxserver/sabnzbd";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "8080:8080" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [ "sabnzbd_config:/config" "${cfg.dataDir}:/data" ];
|
||||
};
|
||||
|
||||
sonarr = {
|
||||
image = "linuxserver/sonarr";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "8989:8989" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [ "sonarr_config:/config" "${cfg.dataDir}:/data" ];
|
||||
};
|
||||
|
||||
radarr = {
|
||||
image = "linuxserver/radarr";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "7878:7878" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [
|
||||
"radarr_config:/config"
|
||||
"${cfg.dataDir}:/data"
|
||||
];
|
||||
};
|
||||
|
||||
services.caddy = lib.mkIf cfg.proxy.enable {
|
||||
enable = true;
|
||||
enableReload = false;
|
||||
virtualHosts = {
|
||||
"jackett.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:9117
|
||||
'';
|
||||
"radarr.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:7878
|
||||
'';
|
||||
"sabnzbd.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:8080
|
||||
'';
|
||||
"sonarr.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:8989
|
||||
'';
|
||||
};
|
||||
|
||||
sabnzbd = {
|
||||
image = "linuxserver/sabnzbd";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "8080:8080" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [
|
||||
"sabnzbd_config:/config"
|
||||
"${cfg.dataDir}:/data"
|
||||
];
|
||||
};
|
||||
|
||||
sonarr = {
|
||||
image = "linuxserver/sonarr";
|
||||
autoStart = true;
|
||||
user = "1000:100";
|
||||
ports = [ "8989:8989" ];
|
||||
extraOptions = [
|
||||
"--init=true"
|
||||
"--pod=download"
|
||||
];
|
||||
volumes = [
|
||||
"sonarr_config:/config"
|
||||
"${cfg.dataDir}:/data"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services.caddy = lib.mkIf cfg.proxy.enable {
|
||||
enable = true;
|
||||
enableReload = false;
|
||||
virtualHosts = {
|
||||
"jackett.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:9117
|
||||
'';
|
||||
"radarr.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:7878
|
||||
'';
|
||||
"sabnzbd.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:8080
|
||||
'';
|
||||
"sonarr.${cfg.proxy.hostName}".extraConfig = ''
|
||||
reverse_proxy http://${cfg.proxy.serverName}:8989
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue