1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00
mdlayher-homelab/nixos/servnerr-3/containers.nix
Matt Layher 88904bc3ad
nixos/servnerr-3: explicitly import nixos-unstable-small
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-06-14 10:49:54 -04:00

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" ];
};
};
}