infrastructure/nixos/hosts/hades/pmm/configuration.nix
Renovate Bot 5170822b2c
Some checks failed
Lint / lint (push) Failing after 1m26s
Plex Update / update (push) Failing after 2m37s
chore(deps): update meisnate12/plex-meta-manager docker tag to v1.19.1
2023-09-25 10:32:42 +02:00

49 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 = config.virtualisation.oci-containers.containers.plex-meta-manager.image;
run_pmm = pkgs.writeScriptBin "pmm-run" ''
sudo ${pkgs.podman}/bin/podman run -d --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 = "meisnate12/plex-meta-manager:v1.19.1";
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"
];
};
};
};
}