ookflix: segment modules

This commit is contained in:
ooks-io 2024-12-04 13:19:54 +11:00
parent 4edb21607c
commit bee284691a
21 changed files with 314 additions and 100 deletions

View file

@ -0,0 +1,28 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf getExe;
inherit (config.ooknet.server) ookflix;
inherit (config.virtualisation) podman;
podmanCommand = getExe podman.package;
in {
config = mkIf ookflix.enable {
systemd.services = {
"podman-ookflix-network" = {
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
SyslogIdentifier = "%N";
};
unitConfig = {
"RequiresMountsFor" = "%t/containers";
};
wantedBy = ["multi-user.target"];
script = "${podmanCommand} network create --ignore --driver=bridge ookflix";
};
};
};
}