nixos-config/modules/nginx-proxy-manager/default.nix
Erwin Boskma 4cd0f83ce8
Some checks failed
/ check (push) Failing after 2m46s
Run nixfmt
2024-02-05 11:46:52 +01:00

39 lines
841 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.nginx-proxy-manager;
in
{
options.eboskma.nginx-proxy-manager = {
enable = mkEnableOption "Nginx Proxy Manager";
};
config = mkIf cfg.enable {
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
virtualisation.oci-containers.containers = {
nginx-proxy-manager = {
autoStart = true;
image = "jc21/nginx-proxy-manager:latest";
ports = [
"80:80"
"81:81"
"443:443"
"2222:2222"
"8443:8443"
];
volumes = [
"/var/lib/npm/data:/data"
"letsencrypt:/etc/letsencrypt"
];
};
};
users.users.${config.eboskma.var.mainUser}.extraGroups = [ "docker" ];
};
}