initial pmm

This commit is contained in:
Vivian 2022-11-04 14:25:13 +01:00
parent de4cb654af
commit 331c483802
11 changed files with 149 additions and 18 deletions

View file

@ -34,6 +34,11 @@
mac = "7A:14:15:ED:D1:E6";
tags = [ "vault" ];
}
{
hostname = "pmm";
ip = "192.168.0.104";
mac = "7A:A3:59:1D:69:07";
}
{
hostname = "MariaDB";
ip = "192.168.0.109";

View file

View file

@ -0,0 +1,32 @@
templates:
Actor:
actor: tmdb
tmdb_person: <<person>>
tmdb_actor_details: <<person>>
sort_title: +_<<collection_name>>
sync_mode: sync
collection_order: release
collection_mode: hide
Set:
optional:
- collection
- movie
- list
tmdb_collection_details: <<collection>>
tmdb_movie: <<movie>>
tmdb_list: <<list>>
sync_mode: sync
collection_order: release
url_poster: <<poster>>
sort_title: <<collection_name>>
collections:
Marvel Cinematic Universe:
template:
name: Set
list: 8194961
poster: https://theposterdb.com/api/assets/162417
Star Wars:
template:
name: Set
collection: 10
poster: https://theposterdb.com/api/assets/164120

View file

@ -0,0 +1,36 @@
templates:
set:
optional:
- network
- list
tmdb_network: <<network>>
tmdb_list: <<list>>
sort_title: <<collection_name>>
sync_mode: sync
url_poster: <<poster>>
url_background: <<background>>
collections:
Marvel Television:
template:
name: set,
list: "8205726"
poster: https://theposterdb.com/api/assets/239453
background: https://i.imgur.com/ckx6reE.jpg
summary: Marvel Television
Star Wars:
template:
name: set
list: "8205730"
poster: https://theposterdb.com/api/assets/164120
background: https://i.imgur.com/OvxROTE.jpg
summary: Star Wars
Star Trek:
template:
name: set
list: "8215091"
poster: https://theposterdb.com/api/assets/222279
background: https://i.imgur.com/Yp0NCZa.jpg
summary: Star Trek

View file

@ -0,0 +1,49 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
let
datadir = "/var/lib/pmm/config";
container = "meisnate12/plex-meta-manager:latest";
run_pmm = pkgs.writeScriptBin "pmm-run" ''
sudo ${pkgs.podman}/bin/podman run --rm -it \
-v "/var/lib/pmm/config:/config:rw" \
-v "/etc/pmm/Anime.yml:/config/Anime.yml:ro" \
-v "/etc/pmm/Movies.yml:/config/Movies.yml:ro" \
-v "/etc/pmm/TVShows.yml:/config/TVShows.yml:ro" \
${container} --run
'';
in {
imports = [ ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
networking.firewall.allowedTCPPorts = [ ];
environment.etc.pmm.source = ./config;
environment.systemPackages = [ run_pmm ];
virtualisation.podman.enable = true;
virtualisation.oci-containers = {
backend = "podman";
containers = {
plex-meta-manager = {
image = container;
volumes = [
"${datadir}:/config:rw"
"/etc/pmm/Anime.yml:/config/Anime.yml:ro"
"/etc/pmm/Movies.yml:/config/Movies.yml:ro"
"/etc/pmm/TVShows.yml:/config/TVShows.yml:ro"
];
};
};
};
}