run k3s deploys as root

This commit is contained in:
2026-05-31 22:21:24 -05:00
parent 638a367fea
commit e9f32c5b5d
+2 -1
View File
@@ -35,6 +35,8 @@
}; };
}; };
config = lib.mkIf opts.enable {
systemd.services.nimh-static = { systemd.services.nimh-static = {
description = "oneshot apply service to k3s"; description = "oneshot apply service to k3s";
after = [ "k3s.service" ]; after = [ "k3s.service" ];
@@ -48,7 +50,6 @@
echo "Generating templated files" echo "Generating templated files"
gomplate=${pkgs.gomplate}/bin/gomplate gomplate=${pkgs.gomplate}/bin/gomplate
$gomplate --input-dir=${k3sDir} --output-dir=$kubernetes_config -d site=file://${siteDir}/index.html?type=text/plain $gomplate --input-dir=${k3sDir} --output-dir=$kubernetes_config -d site=file://${siteDir}/index.html?type=text/plain
cat $kubernetes_config/configmap.yaml
echo "Applying k3s config" echo "Applying k3s config"
kubectl=${pkgs.kubectl}/bin/kubectl kubectl=${pkgs.kubectl}/bin/kubectl
$kubectl apply -k $kubernetes_config $kubectl apply -k $kubernetes_config