Merge branch 'main' of ssh://codeberg.org/27/inception-of-things

This commit is contained in:
Namonay
2025-12-17 16:35:29 +01:00
3 changed files with 23 additions and 20 deletions

View File

@ -7,13 +7,13 @@ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/late
kubectl patch deployment metrics-server -n kube-system --type='json' \ kubectl patch deployment metrics-server -n kube-system --type='json' \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
echo '> Waiting for metrics-server to be ready...' echo '> metrics-server is starting (this takes around ~3 minutes)...'
kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=300s kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=500s
kubectl create namespace argocd kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
echo "> ArgoCD is starting (this takes around ~5 minutes)..." echo "> ArgoCD is starting (this takes around ~6 minutes)..."
sleep 10 sleep 10
echo '> Starting watch...' echo '> Starting watch...'
sleep 5 sleep 5
@ -44,7 +44,7 @@ echo '> App is starting (this takes around ~30 seconds)...'
kubectl wait --namespace dev \ kubectl wait --namespace dev \
--for=condition=ready pod \ --for=condition=ready pod \
--selector=app.kubernetes.io/name=app-deployment \ --selector=app=app-p3 \
--timeout=300s --timeout=300s
echo 'App imported in ArgoCD' echo 'App imported in ArgoCD'
sleep 10 sleep 10
@ -63,3 +63,5 @@ echo Username: admin
echo -n "Password: " echo -n "Password: "
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
echo "===============================" echo "==============================="
kubectl port-forward svc/argocd-server -n argocd 8080:443

View File

@ -26,6 +26,15 @@
script = '' script = ''
mkdir -p /iot mkdir -p /iot
/run/wrappers/bin/mount -t 9p -o trans=virtio,version=9p2000.L host0 /iot /run/wrappers/bin/mount -t 9p -o trans=virtio,version=9p2000.L host0 /iot
rm -rf /home/user/iot /root/iot
mkdir /home/user/iot -p
cp -r /iot/p* /iot/bonus /home/user/iot/
chown -R user:user /home/user/iot
mkdir /root/iot -p
cp -r /iot/p* /iot/bonus /rot/iot/
''; '';
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -47,19 +56,8 @@
}; };
services = { services = {
k3s = { k3s.enable = true;
enable = true;
};
getty.autologinUser = "root"; getty.autologinUser = "root";
openssh = {
enable = true;
ports = [ 22 ];
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = true;
AllowUsers = null;
};
};
xserver = { xserver = {
enable = true; enable = true;
xkb = { xkb = {
@ -81,15 +79,19 @@
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
}; };
virtualisation.docker.enable = true;
virtualisation = {
virtualbox.host.enable = true;
docker.enable = true;
};
boot.kernelParams = [ "kvm.enable_virt_at_load=0" ]; boot.kernelParams = [ "kvm.enable_virt_at_load=0" ];
programs = { programs = {
zsh = { zsh = {
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
enable = true; enable = true;
enableBashCompletion = true; enableBashCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
shellAliases = (import ./aliases.nix); shellAliases = (import ./aliases.nix);
}; };
}; };

View File

@ -84,7 +84,6 @@
-m 4G \ -m 4G \
-smp 1 \ -smp 1 \
-cpu host \ -cpu host \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0 -virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0
''; '';
in in