2024-02-05 11:46:52 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
2022-03-01 22:19:03 +01:00
|
|
|
cfg = config.eboskma.nginx-proxy-manager;
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2024-02-05 11:46:52 +01:00
|
|
|
options.eboskma.nginx-proxy-manager = {
|
|
|
|
enable = mkEnableOption "Nginx Proxy Manager";
|
|
|
|
};
|
2022-01-24 11:14:34 +01:00
|
|
|
|
2022-05-03 18:17:38 +02:00
|
|
|
config = mkIf cfg.enable {
|
2022-11-01 19:59:28 +01:00
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
autoPrune = {
|
|
|
|
enable = true;
|
|
|
|
dates = "weekly";
|
|
|
|
};
|
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
|
2022-01-24 11:14:34 +01:00
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
nginx-proxy-manager = {
|
|
|
|
autoStart = true;
|
|
|
|
image = "jc21/nginx-proxy-manager:latest";
|
|
|
|
ports = [
|
|
|
|
"80:80"
|
|
|
|
"81:81"
|
|
|
|
"443:443"
|
2022-09-22 23:33:19 +02:00
|
|
|
"2222:2222"
|
2022-11-11 20:40:31 +01:00
|
|
|
"8443:8443"
|
2022-01-24 11:14:34 +01:00
|
|
|
];
|
|
|
|
volumes = [
|
|
|
|
"/var/lib/npm/data:/data"
|
|
|
|
"letsencrypt:/etc/letsencrypt"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-11-01 19:59:28 +01:00
|
|
|
users.users.${config.eboskma.var.mainUser}.extraGroups = [ "docker" ];
|
2022-01-24 11:14:34 +01:00
|
|
|
};
|
|
|
|
}
|