aboutsummaryrefslogtreecommitdiff
path: root/nix-personal
diff options
context:
space:
mode:
Diffstat (limited to 'nix-personal')
-rw-r--r--nix-personal/configuration.nix10
-rw-r--r--nix-personal/k8s/ingress.yaml33
-rw-r--r--nix-personal/k8s/svc.yaml24
-rw-r--r--nix-personal/landing/index.html5
4 files changed, 72 insertions, 0 deletions
diff --git a/nix-personal/configuration.nix b/nix-personal/configuration.nix
index 1b958e2..537a32e 100644
--- a/nix-personal/configuration.nix
+++ b/nix-personal/configuration.nix
@@ -37,4 +37,14 @@
hostName = "puppy";
domain = "girlth.ing";
};
+
+ # Basic nginx placeholder
+ networking.firewall.allowedTCPPorts = [80];
+ services.nginx = {
+ enable = true;
+ virtualHosts."girlth.ing" = {
+ default = true;
+ root = ./landing;
+ };
+ };
}
diff --git a/nix-personal/k8s/ingress.yaml b/nix-personal/k8s/ingress.yaml
new file mode 100644
index 0000000..3849905
--- /dev/null
+++ b/nix-personal/k8s/ingress.yaml
@@ -0,0 +1,33 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ annotations:
+ traefik.ingress.kubernetes.io/router.tls: "true"
+ traefik.ingress.kubernetes.io/router.tls.certresolver: letsencrypt
+ traefik.ingress.kubernetes.io/router.tls.domains.0.main: 'girlth.ing'
+ traefik.ingress.kubernetes.io/router.tls.domains.0.sans: '*.girlth.ing'
+ name: girlthing-all
+ namespace: tcmal
+spec:
+ ingressClassName: traefik
+ rules:
+ - host: '*.girlth.ing'
+ http:
+ paths:
+ - backend:
+ service:
+ name: puppy
+ port:
+ name: http
+ path: /
+ pathType: ImplementationSpecific
+ - host: 'girlth.ing'
+ http:
+ paths:
+ - backend:
+ service:
+ name: puppy
+ port:
+ name: http
+ path: /
+ pathType: ImplementationSpecific
diff --git a/nix-personal/k8s/svc.yaml b/nix-personal/k8s/svc.yaml
new file mode 100644
index 0000000..e6dfdfb
--- /dev/null
+++ b/nix-personal/k8s/svc.yaml
@@ -0,0 +1,24 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: puppy
+ namespace: tcmal
+spec:
+ ports:
+ - name: http
+ port: 80
+ protocol: TCP
+ targetPort: 80
+---
+apiVersion: v1
+kind: Endpoints
+metadata:
+ name: puppy
+ namespace: tcmal
+subsets:
+- addresses:
+ - ip: 192.168.1.248
+ ports:
+ - name: http
+ port: 80
+ protocol: TCP
diff --git a/nix-personal/landing/index.html b/nix-personal/landing/index.html
new file mode 100644
index 0000000..5d5f6be
--- /dev/null
+++ b/nix-personal/landing/index.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ <h1>It works!</h1>
+ </body>
+</html>