diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f0c82f..718cc01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,14 @@ default: tags: - kubernetes script: - - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" + - >- + podman login + -u "$CI_REGISTRY_USER" + -p "$CI_REGISTRY_PASSWORD" + "$CI_REGISTRY" - podman load -i "${IMG}.tar.gz" - - podman tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" + - >- + podman tag + "localhost/${IMG}:latest" + "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" - podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" diff --git a/checks.nix b/checks.nix index 723e87e..8e828e6 100644 --- a/checks.nix +++ b/checks.nix @@ -1,4 +1,9 @@ -{ hooks, system, ... }: +{ + hooks, + lib, + system, + ... +}: { pre-commit-check = hooks.lib.${system}.run { @@ -9,6 +14,26 @@ #flake-checker.enable = true; nixfmt-rfc-style.enable = true; check-merge-conflicts.enable = true; + check-yaml.enable = true; + yamllint = { + enable = true; + args = [ + "--config-data" + (lib.generators.toYAML { } { + extends = "default"; + ignore = [ + "manifests/cnpg-system/barman-cloud.yaml" + ".pre-commit-config.yaml" + ]; + rules = { + comments = false; + comments-indentation = false; + document-start = false; + }; + }) + ]; + verbose = true; + }; }; }; } diff --git a/compose/attic.yaml b/compose/attic.yaml index 9933aad..68eff83 100644 --- a/compose/attic.yaml +++ b/compose/attic.yaml @@ -37,7 +37,6 @@ services: image: postgres:17.6-alpine restart: unless-stopped ports: [] - #- 5432:5432 networks: pgattic: volumes: diff --git a/flake.nix b/flake.nix index 231bffa..7808cb8 100644 --- a/flake.nix +++ b/flake.nix @@ -122,6 +122,7 @@ checks = import ./checks.nix { inherit system; inherit (top) hooks; + inherit (pkgs) lib; }; devShells = import ./shells.nix { diff --git a/manifests/auto/nodes.yaml b/manifests/auto/nodes.yaml index 379f0bd..e1e9c24 100644 --- a/manifests/auto/nodes.yaml +++ b/manifests/auto/nodes.yaml @@ -5,7 +5,11 @@ metadata: annotations: "node.longhorn.io/default-disks-config": |- [ - { "path": "/var/lib/longhorn", "allowScheduling" : true, "tags": ["hdd", "large"]} + { + "path": "/var/lib/longhorn", + "allowScheduling" : true, + "tags": ["hdd", "large"] + } ] --- apiVersion: v1 @@ -15,7 +19,11 @@ metadata: annotations: "node.longhorn.io/default-disks-config": |- [ - { "path": "/var/lib/longhorn", "allowScheduling" : true, "tags": ["hdd", "large"]} + { + "path": "/var/lib/longhorn", + "allowScheduling" : true, + "tags": ["hdd", "large"] + } ] --- apiVersion: v1 @@ -25,5 +33,9 @@ metadata: annotations: "node.longhorn.io/default-disks-config": |- [ - { "path": "/var/lib/longhorn", "allowScheduling" : trues, "tags": ["ssd", "fast"]} + { + "path": "/var/lib/longhorn", + "allowScheduling" : trues, + "tags": ["ssd", "fast"] + } ] diff --git a/manifests/bitwarden/cluster-stores.yaml b/manifests/bitwarden/cluster-stores.yaml index 32e1a93..5858eee 100644 --- a/manifests/bitwarden/cluster-stores.yaml +++ b/manifests/bitwarden/cluster-stores.yaml @@ -6,6 +6,7 @@ metadata: spec: provider: webhook: + # yamllint disable-line rule:line-length url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" headers: Content-Type: application/json @@ -19,6 +20,7 @@ metadata: spec: provider: webhook: + # yamllint disable-line rule:line-length url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" result: jsonPath: '$.data.fields[?@.name=="{{ .remoteRef.property }}"].value' @@ -30,6 +32,7 @@ metadata: spec: provider: webhook: + # yamllint disable-line rule:line-length url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" result: jsonPath: "$.data.notes" @@ -41,5 +44,6 @@ metadata: spec: provider: webhook: + # yamllint disable-line rule:line-length url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/attachment/{{ .remoteRef.property }}?itemid={{ .remoteRef.key }}" result: {} diff --git a/manifests/bitwarden/deployment.yaml b/manifests/bitwarden/deployment.yaml index 3a3fa7c..6dfd9c7 100644 --- a/manifests/bitwarden/deployment.yaml +++ b/manifests/bitwarden/deployment.yaml @@ -21,11 +21,12 @@ spec: spec: containers: - name: bitwarden-cli - # Since my gitlab instance depends on the database hosted in k3s, and the - # database depends on this image, I need a way to bootstrap the system if - # I am doing disaster recovery. And this is it. - image: "ghcr.io/greg-hellings/nixos-config/img-bitwarden:latest" - #image: "registry.thehellings.com/greg/nixos-config/img-bitwarden:latest" + # Since my gitlab instance depends on the database hosted in k3s, and + # the database depends on this image, I need a way to bootstrap the + # system if # I am doing disaster recovery. And this is it. + #image: "ghcr.io/greg-hellings/nixos-config/img-bitwarden:latest" + image: >- + registry.thehellings.com/greg/nixos-config/img-bitwarden:latest imagePullPolicy: Always env: - name: BW_CLIENTID diff --git a/manifests/databases/postgres-cluster.yaml b/manifests/databases/postgres-cluster.yaml index 45716f1..e04ded7 100644 --- a/manifests/databases/postgres-cluster.yaml +++ b/manifests/databases/postgres-cluster.yaml @@ -39,11 +39,11 @@ spec: parameters: barmanObjectName: k3sbackup-objectstore - # Use this as the target of the bootstrap recovery process - # It is important that the `externalClusters` serverName matches - # the old name of the original cluster that you are upgrading. - # When restoring, set the targetTime to the latest backup that you - # want to restore to +# Use this as the target of the bootstrap recovery process +# It is important that the `externalClusters` serverName matches +# the old name of the original cluster that you are upgrading. +# When restoring, set the targetTime to the latest backup that you +# want to restore to # bootstrap: # recovery: # source: origin diff --git a/manifests/helm/longhorn.yaml b/manifests/helm/longhorn.yaml index 68fb046..dc7d757 100644 --- a/manifests/helm/longhorn.yaml +++ b/manifests/helm/longhorn.yaml @@ -42,6 +42,7 @@ metadata: name: longhorn-custom-path namespace: longhorn-system data: + # yamllint disable-line rule:line-length PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin --- apiVersion: kyverno.io/v1 @@ -113,6 +114,7 @@ metadata: namespace: longhorn-system annotations: ingressClassName: traefik + # yamllint disable-line rule:line-length traefik.ingress.kubernetes.io/router.middlewares: longhorn-system-basic-auth@kubernetescrd # Set body size to 10G to allow uploading large things traefik.ingress.kubernetes.io/buffering: | @@ -121,19 +123,19 @@ metadata: spec: ingressClassName: traefik rules: - - &host - host: longhorn.cluster - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: longhorn-frontend - port: - number: 80 - - <<: *host - host: longhorn.kubernetes + - &host + host: longhorn.cluster + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: longhorn-frontend + port: + number: 80 + - <<: *host + host: longhorn.kubernetes --- apiVersion: storage.k8s.io/v1 kind: StorageClass diff --git a/manifests/immich/chart.yaml b/manifests/immich/chart.yaml index 7cc1bb8..7aecf4e 100644 --- a/manifests/immich/chart.yaml +++ b/manifests/immich/chart.yaml @@ -8,7 +8,8 @@ spec: ref: # Version 0.10.0 # For some reason, I can't get it to pull by tag or by auto-discovery - digest: "sha256:bcffd3d504664710baa7c0bcd66dc246437c51a9a76f9b8ed1a10c7aecd80766" + digest: >- + sha256:bcffd3d504664710baa7c0bcd66dc246437c51a9a76f9b8ed1a10c7aecd80766 --- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease diff --git a/manifests/immich/db-restore.yaml b/manifests/immich/db-restore.yaml index d20a09a..ea97864 100644 --- a/manifests/immich/db-restore.yaml +++ b/manifests/immich/db-restore.yaml @@ -45,7 +45,7 @@ metadata: name: pgvector spec: imageName: "ghcr.io/immich-app/postgres:16-vectorchord0.5.3" - #imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0" + # imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0" instances: 1 storage: size: 60Gi diff --git a/manifests/matrix/dendrite-config.yaml b/manifests/matrix/dendrite-config.yaml index 50d3b49..1cfc06a 100644 --- a/manifests/matrix/dendrite-config.yaml +++ b/manifests/matrix/dendrite-config.yaml @@ -32,6 +32,7 @@ spec: engineVersion: v2 data: matrix.pem: "{{ .matrix_pem }}" + # yamllint disable rule:line-length dendrite.yaml: | version: 2 global: @@ -187,3 +188,4 @@ spec: headers: null baggage_restrictions: null throttler: null + # yamllint enable rule:line-length