1

Enable new services

This commit is contained in:
2023-09-12 16:01:54 +02:00
parent 27c7cc3ba0
commit b5c87c3398

View File

@ -12,12 +12,14 @@
<home-manager/nixos>
# Include Services
./services/authelia.nix
./services/fileflows.nix
./services/homepage.nix
./services/hydra.nix
./services/jellyfin.nix
./services/jellyseerr.nix
# ./services/nextcloud.nix
./services/nginx-proxy-manager.nix
./services/pihole.nix
./services/portainer.nix
./services/prowlarr.nix
@ -26,7 +28,7 @@
./services/sonarr.nix
./services/stash.nix
./services/whats-up-docker.nix
# ./services/wireguard_vps.nix
./services/wireguard-vps.nix
];
# Bootloader.
@ -81,6 +83,27 @@
];
};
systemd.services.init-behind-nginx-docker-network = {
description = "Create a docker network bridge for all services behind nginx-proxy-manager.";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
script = let
dockercli = "${config.virtualisation.docker.package}/bin/docker";
network = "behind-nginx";
in ''
# Put a true at the end to prevent getting non-zero return code, which will
# crash the whole service.
check=$(${dockercli} network ls | grep ${network} || true)
if [ -z "$check" ]; then
${dockercli} network create ${network}
else
echo "${network} already exists in docker"
fi
'';
};
# Set your time zone.
time.timeZone = "Europe/Berlin";