Nix-Config/hosts/servers/poseidon/old/oci-containers/default.nix
2026-05-19 20:32:25 -05:00

38 lines
No EOL
904 B
Nix

{config, pkgs, lib, ...}:
let
jellyfin = import ./jellyfin.nix;
torrents = import ./torrents.nix;
misc = import ./misc.nix;
synapse = import ./synapse.nix;
important = import ./important.nix;
games = import ./games.nix;
cont_list = lib.foldr lib.recursiveUpdate {} [
jellyfin
torrents
# misc
# synapse
important
#games
];
in
{
# Setup docker containers
virtualisation.oci-containers = {
backend = "docker";
containers = cont_list;
};
systemd.services."docker-network-forgejo" = {
serviceConfig.Type = "oneshot";
wantedBy = [
"docker-forgejo.service"
"docker-forgejo-db.service"
];
before = [
"docker-forgejo.service"
"docker-forgejo-db.service"
];
script = ''
${pkgs.docker}/bin/docker network inspect forgejo > /dev/null 2>&1 || ${pkgs.docker}/bin/docker network create forgejo
'';
};
}