nixos-servers/nix/flake/kubenix/syncthing.nix
Pim Kunis 40fc4013de install cert-manager
issue certificates for public domains
temporarily disable private domains
2024-04-07 14:07:05 +02:00

100 lines
2.2 KiB
Nix

{
kubernetes.resources = {
configMaps.syncthing.data = {
PUID = "33";
PGID = "33";
TZ = "Europe/Amsterdam";
};
deployments.syncthing = {
metadata.labels.app = "syncthing";
spec = {
selector.matchLabels.app = "syncthing";
template = {
metadata.labels.app = "syncthing";
spec = {
containers.syncthing = {
image = "lscr.io/linuxserver/syncthing:1.23.6";
envFrom = [{ configMapRef.name = "syncthing"; }];
ports = [{
containerPort = 8384;
protocol = "TCP";
}];
volumeMounts = [
{
name = "config";
mountPath = "/config";
}
{
name = "nextcloud-data";
mountPath = "/data";
}
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "syncthing";
}
{
name = "nextcloud-data";
persistentVolumeClaim.claimName = "nextcloud";
}
];
};
};
};
};
persistentVolumes.syncthing.spec = {
capacity.storage = "1Mi";
accessModes = [ "ReadWriteMany" ];
nfs = {
server = "lewis.hyp";
path = "/mnt/data/nfs/syncthing/config";
};
};
persistentVolumeClaims.syncthing.spec = {
accessModes = [ "ReadWriteMany" ];
storageClassName = "";
resources.requests.storage = "1Mi";
volumeName = "syncthing";
};
services.syncthing.spec = {
selector.app = "syncthing";
ports = [{
protocol = "TCP";
port = 80;
targetPort = 8384;
}];
};
# ingresses.syncthing.spec = {
# ingressClassName = "traefik";
# rules = [{
# host = "sync.kun.is";
# http.paths = [{
# path = "/";
# pathType = "Prefix";
# backend.service = {
# name = "syncthing";
# port.number = 80;
# };
# }];
# }];
# };
};
}