diff --git a/clanServices/k3s/default.nix b/clanServices/k3s/default.nix index 98db23f..6786984 100644 --- a/clanServices/k3s/default.nix +++ b/clanServices/k3s/default.nix @@ -76,6 +76,45 @@ in role = "server"; tokenFile = config.clan.core.vars.generators.k3s.files.token.path; clusterInit = true; + + autoDeployCharts = { + harbor = { + name = "harbor"; + repo = "https://helm.goharbor.io"; + version = "1.14.0"; + hash = "sha256-fMP7q1MIbvzPGS9My91vbQ1d3OJMjwc+o8YE/BXZaYU="; + values = { + existingSecretAdminPassword = "harbor-admin"; + expose = { + tls = { + enabled = true; + certSource = "secret"; + secret.secretName = "my-tls-secret"; + }; + ingress = { + hosts.core = "example.com"; + className = "nginx"; + }; + }; + }; + }; + + crossplane = { + name = "crossplane"; + repo = "https://charts.crossplane.io/stable"; + version = "2.0.2"; + hash = "sha256-EIDrBQmtMaHlapVNUYABKejIj1I02g5R5h4cADZvtAg="; + + targetNamespace = "crossplane-system"; + createNamespace = true; + + values = { + replicas = 1; + + deploymentStrategy = "RollingUpdate"; + }; + }; + }; }; }; diff --git a/flake.nix b/flake.nix index 03e4d59..2a8bf8d 100644 --- a/flake.nix +++ b/flake.nix @@ -35,8 +35,9 @@ clan-core.flakeModules.testModule # ./checks/flake-module.nix - ./devShells/flake-module.nix ./clanServices/flake-module.nix + ./devShells/flake-module.nix + ./pkgs/flake-module.nix ]; flake = { diff --git a/pkgs/crossplane/default.nix b/pkgs/crossplane/default.nix new file mode 100644 index 0000000..a4858ff --- /dev/null +++ b/pkgs/crossplane/default.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: + +pkgs.buildGoModule rec { + pname = "crossplane"; + version = "2.0.2"; + + src = pkgs.fetchFromGitHub { + owner = "crossplane"; + repo = "crossplane"; + tag = "v2.0.2"; + sha256 = "sha256-EIDrBQmtMaHlapVNUYABKejIj1I02g5R5h4cADZvtAg="; + }; + + vendorHash = "sha256-8VqKtWbnDGbmgxT13v2d4+nXHouZ4hi2c2m66SAd1KM="; +} diff --git a/pkgs/flake-module.nix b/pkgs/flake-module.nix new file mode 100644 index 0000000..0db79c3 --- /dev/null +++ b/pkgs/flake-module.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + imports = []; + + perSystem = + { config, pkgs, ... }: + { + packages = { + # crossplane = pkgs.callPackage ./crossplane { }; + }; + }; +}