podman: added podman morphos service
This commit is contained in:
parent
0e1dfa5f70
commit
1e9efb4081
|
@ -15,6 +15,7 @@ in
|
|||
openobserve.enable = lib.mkEnableOption "openobserve podman";
|
||||
minecraft.enable = mkEnableOption "minecraft server podman";
|
||||
memos.enable = mkEnableOption "memos podman";
|
||||
morphos.enable = mkEnableOption "morphos podman";
|
||||
|
||||
servarr = {
|
||||
enable = mkEnableOption "servarr group";
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
openobserve.enable = true;
|
||||
minecraft.enable = true;
|
||||
memos.enable = true;
|
||||
morphos.enable = true;
|
||||
};
|
||||
|
||||
docker = {
|
||||
|
|
|
@ -43,6 +43,7 @@ in
|
|||
imports = [
|
||||
./memos.nix
|
||||
./minecraft.nix
|
||||
./morphos.nix
|
||||
./openobserve.nix
|
||||
./pihole.nix
|
||||
./qbittorrent.nix
|
||||
|
|
40
system/podman/morphos.nix
Normal file
40
system/podman/morphos.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
name = "morphos";
|
||||
podman = config.profile.podman;
|
||||
inherit (lib) mkIf;
|
||||
ip = "10.88.88.2";
|
||||
image = "ghcr.io/danvergara/morphos-server:latest";
|
||||
domain = "${name}.tigor.web.id";
|
||||
user = config.profile.user;
|
||||
uid = toString user.uid;
|
||||
gid = toString user.gid;
|
||||
in
|
||||
{
|
||||
config = mkIf (podman.enable && podman.${name}.enable) {
|
||||
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||
reverse_proxy ${ip}:8080
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers.${name} = {
|
||||
inherit image;
|
||||
hostname = name;
|
||||
autoStart = true;
|
||||
user = "${uid}:${gid}";
|
||||
environment = {
|
||||
TZ = "Asia/Jakarta";
|
||||
};
|
||||
volumes = [
|
||||
"/tmp:/tmp"
|
||||
];
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
"--ip=${ip}"
|
||||
];
|
||||
labels = {
|
||||
"io.containers.autoupdate" = "registry";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue