containers: add oryx
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
2eb0b19d8a
commit
879481925b
4 changed files with 45 additions and 1 deletions
42
options/custom/containers/oryx.nix
Normal file
42
options/custom/containers/oryx.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.containers.oryx;
|
||||
in {
|
||||
options.custom.containers.oryx.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets = let
|
||||
secret = filename: {
|
||||
file = "${inputs.self}/secrets/${filename}";
|
||||
};
|
||||
in {
|
||||
"${config.custom.profile}/oryx/.env" = secret "${config.custom.profile}/oryx/.env";
|
||||
};
|
||||
|
||||
#?? arion-oryx pull
|
||||
environment.shellAliases.arion-oryx = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.oryx.settings.out.dockerComposeYaml}";
|
||||
|
||||
virtualisation.arion.projects.oryx.settings.services = {
|
||||
oryx.service = {
|
||||
container_name = "oryx";
|
||||
env_file = [config.age.secrets."${config.custom.profile}/oryx/.env".path];
|
||||
image = "ossrs/oryx:5";
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:2022:2022" # HTTP
|
||||
"1935:1935" # RTMP
|
||||
"8000:8000/udp" # WebRTC
|
||||
"10080:10080/udp" # SRT
|
||||
];
|
||||
|
||||
restart = "unless-stopped";
|
||||
volumes = ["${config.custom.containers.directory}/oryx/data:/data"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -19,7 +19,8 @@
|
|||
mastodon.enable = true;
|
||||
netbox.enable = true;
|
||||
#// nextcloud.enable = true;
|
||||
owncast.enable = true;
|
||||
oryx.enable = true;
|
||||
#// owncast.enable = true;
|
||||
#// redlib.enable = true;
|
||||
#// searxng.enable = true;
|
||||
};
|
||||
|
|
|
@ -83,6 +83,7 @@ in {
|
|||
"server/netdata/parent.conf".publicKeys = server;
|
||||
"server/nextcloud/.env".publicKeys = server;
|
||||
"server/nextcloud/db.env".publicKeys = server;
|
||||
"server/oryx/.env".publicKeys = server;
|
||||
"server/searxng/.env".publicKeys = server;
|
||||
"server/users/myned.pass".publicKeys = server;
|
||||
"server/users/root.pass".publicKeys = server;
|
||||
|
|
BIN
secrets/server/oryx/.env
Normal file
BIN
secrets/server/oryx/.env
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue