diff --git a/.envrc b/.envrc index 5a85586..a15fe4f 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,2 @@ -use_nix +use_flake echo "HOMELAB NIX" \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ef99b4b --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = ""; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + futils.url = "github:numtide/flake-utils"; + }; + outputs = + { self, nixpkgs, futils }: ( + futils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; + in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + # utilities + yq + bat + jq + # k8s + k3d + (wrapHelm kubernetes-helm { + plugins = with pkgs.kubernetes-helmPlugins; [ + helm-diff + ]; + }) + helmfile-wrapped + argocd + yq + jq + ]; + shellHook = '' + echo "$(pwd)" + export PATH="$(pwd)/bin:$PATH" + export PROMPT="🏠> $PROMPT" + echo "Welcome to HomeLab!" + ''; + }; + } + ) + ); +} diff --git a/helmfile.yaml b/helmfile.yaml new file mode 100644 index 0000000..6afc827 --- /dev/null +++ b/helmfile.yaml @@ -0,0 +1,45 @@ +repositories: + - name: prometheus-community + url: https://prometheus-community.github.io/helm-charts + - name: grafana + url: https://grafana.github.io/helm-charts + - name: external-secrets + url: https://charts.external-secrets.io + - name: kubernetes-dashboard + url: https://kubernetes.github.io/dashboard/ + +releases: + - name: external-secrets + namespace: plugin-external-secrets + chart: external-secrets/external-secrets + version: "0.11.0" + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chart: kubernetes-dashboard/kubernetes-dashboard + # - name: prometheus-operator-crds + # namespace: plugin-monitoring + # chart: prometheus-community/prometheus-operator-crds + # version: "17.0.2" + # - name: loki + # namespace: plugin-monitoring + # chart: grafana/loki-stack + # version: "2.10.2" + # values: + # - helmfile/values-loki-stack.yaml + # - name: kube-prometheus-stack + # namespace: plugin-monitoring + # chart: prometheus-community/kube-prometheus-stack + # version: "68.2.1" + # values: + # - helmfile/values-kube-prometheus-stack.yaml + # needs: + # - plugin-monitoring/prometheus-operator-crds + # - name: infra + # chart: ./charts/infra + # namespace: default + # values: + # - charts/infra/values.yaml + # - charts/infra/environments/sibli-gcp-values.yaml + # needs: + # - plugin-monitoring/kube-prometheus-stack + # - plugin-external-secrets/external-secrets \ No newline at end of file diff --git a/shell.nix b/shell.nix deleted file mode 100644 index cc9232b..0000000 --- a/shell.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs ? import { } }: -pkgs.mkShell { - # nativeBuildInputs is usually what you want -- tools you need to run - nativeBuildInputs = with pkgs; [ - git - kubectl - kubernetes-helm - jsonnet - jsonnet-language-server - argocd - yq - jq - python312 - python312Packages.pyyaml - ]; - shellHook = '' - echo "$(pwd)" - export PATH="$(pwd)/bin:$PATH" - export PROMPT="🏠> $PROMPT" - echo "Welcome to HomeLab!" - ''; -} diff --git a/test.jsonnet b/test.jsonnet deleted file mode 100644 index e69de29..0000000