mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-14 11:47:32 +00:00
88904bc3ad
Signed-off-by: Matt Layher <mdlayher@gmail.com>
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ pkgs, lib, ... }:
|
|
|
|
let unstable = import <nixos-unstable-small> { };
|
|
|
|
in {
|
|
containers = {
|
|
# Plex server running containerized and on unstable for faster updates.
|
|
plex = {
|
|
autoStart = true;
|
|
bindMounts = {
|
|
# Mount the ZFS pool as read-only.
|
|
"/primary/media" = {
|
|
hostPath = "/primary/media";
|
|
isReadOnly = true;
|
|
};
|
|
};
|
|
config = { config, pkgs, ... }:
|
|
let unstable = import <nixos-unstable-small> { config.allowUnfree = true; };
|
|
in {
|
|
services.plex = {
|
|
enable = true;
|
|
package = unstable.plex;
|
|
};
|
|
};
|
|
};
|
|
|
|
# UniFi controller running containerized and on unstable for faster updates.
|
|
unifi = {
|
|
autoStart = true;
|
|
config = { config, pkgs, ... }:
|
|
let unstable = import <nixos-unstable-small> { config.allowUnfree = true; };
|
|
in {
|
|
services.unifi = {
|
|
enable = true;
|
|
unifiPackage = unstable.unifi;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
docker-containers = {
|
|
# promlens running on TCP/9091 adjacent to Prometheus.
|
|
promlens = {
|
|
image = "promlabs/promlens";
|
|
ports = [ "9091:8080" ];
|
|
volumes = [ "/var/lib/promlens:/var/lib/promlens" ];
|
|
};
|
|
};
|
|
}
|