mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 15:51:54 -05:00
homelab: separated oci and nix containers into separate files
This commit is contained in:
parent
3f301c1240
commit
21593579a5
|
@ -2,80 +2,13 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./virtualization.nix
|
||||
./nginx_proxy.nix
|
||||
./oci_containers.nix
|
||||
./samba.nix
|
||||
./virtualization.nix
|
||||
./nix_containers.nix
|
||||
];
|
||||
|
||||
# services.ddclient.enable = true;
|
||||
# services.ddclient.configFile = "/etc/ddclient/ddclient.conf";
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
audiobookshelf = {
|
||||
ports = ["0.0.0.0:13378:80"];
|
||||
image = "ghcr.io/advplyr/audiobookshelf:latest";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"abs_config:/config"
|
||||
"abs_metadata:/metadata"
|
||||
"/mnt/Media:/Media"
|
||||
];
|
||||
};
|
||||
plex-server = {
|
||||
ports = ["0.0.0.0:32400:32400"];
|
||||
image = "plexinc/pms-docker:public";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"plex_config:/config"
|
||||
"plex_transcode:/transcode"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
transmission-server = {
|
||||
ports = ["0.0.0.0:9091:9091" "0.0.0.0:51413:51413"];
|
||||
image = "linuxserver/transmission:latest";
|
||||
environment = {
|
||||
PGID = "1000";
|
||||
PUID = "1000";
|
||||
TZ = "America/New_York";
|
||||
};
|
||||
volumes = [
|
||||
"transmission_config:/config"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
jellyfin = {
|
||||
ports = ["0.0.0.0:8096:8096"];
|
||||
image = "jellyfin/jellyfin";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"jellyfin_config:/config"
|
||||
"jellyfin_cache:/cache"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
containers.navidrome = {
|
||||
autoStart = true;
|
||||
bindMounts."/Music".hostPath = "/mnt/Media/Music";
|
||||
config = { config, pkgs, lib, ... }: {
|
||||
system.stateVersion = "24.05";
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = 4533;
|
||||
MusicFolder = "/Music";
|
||||
DefaultTheme = "Auto";
|
||||
SubsonicArtistParticipations = true;
|
||||
UIWelcomeMessage = "Welcome to Navidrome @ raffauflabs.com.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
23
modules/homelab/nix_containers.nix
Normal file
23
modules/homelab/nix_containers.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
containers.navidrome = {
|
||||
autoStart = true;
|
||||
bindMounts."/Music".hostPath = "/mnt/Media/Music";
|
||||
config = { config, pkgs, lib, ... }: {
|
||||
system.stateVersion = "24.05";
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = 4533;
|
||||
MusicFolder = "/Music";
|
||||
DefaultTheme = "Auto";
|
||||
SubsonicArtistParticipations = true;
|
||||
UIWelcomeMessage = "Welcome to Navidrome @ raffauflabs.com.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
52
modules/homelab/oci_containers.nix
Normal file
52
modules/homelab/oci_containers.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.oci-containers.containers = {
|
||||
audiobookshelf = {
|
||||
ports = ["0.0.0.0:13378:80"];
|
||||
image = "ghcr.io/advplyr/audiobookshelf:latest";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"abs_config:/config"
|
||||
"abs_metadata:/metadata"
|
||||
"/mnt/Media:/Media"
|
||||
];
|
||||
};
|
||||
plex-server = {
|
||||
ports = ["0.0.0.0:32400:32400"];
|
||||
image = "plexinc/pms-docker:public";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"plex_config:/config"
|
||||
"plex_transcode:/transcode"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
transmission-server = {
|
||||
ports = ["0.0.0.0:9091:9091" "0.0.0.0:51413:51413"];
|
||||
image = "linuxserver/transmission:latest";
|
||||
environment = {
|
||||
PGID = "1000";
|
||||
PUID = "1000";
|
||||
TZ = "America/New_York";
|
||||
};
|
||||
volumes = [
|
||||
"transmission_config:/config"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
jellyfin = {
|
||||
ports = ["0.0.0.0:8096:8096"];
|
||||
image = "jellyfin/jellyfin";
|
||||
environment = { TZ = "America/New_York"; };
|
||||
volumes = [
|
||||
"jellyfin_config:/config"
|
||||
"jellyfin_cache:/cache"
|
||||
"/mnt/Media:/Media"
|
||||
"/mnt/Archive:/Archive"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue