From afa7a6bcad4fe1cd289feecdc3a455cff4eba8b1 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 24 Sep 2025 07:02:21 +0000 Subject: [PATCH 1/2] too lazy to think of a message, so enjoy this pointless text. Good luck future me... --- clan.nix | 0 clanServices/k3s/default.nix | 2 ++ devShells/flake-module.nix | 0 justfile | 0 4 files changed, 2 insertions(+) mode change 100644 => 100755 clan.nix mode change 100644 => 100755 devShells/flake-module.nix mode change 100644 => 100755 justfile diff --git a/clan.nix b/clan.nix old mode 100644 new mode 100755 diff --git a/clanServices/k3s/default.nix b/clanServices/k3s/default.nix index 98db23f..e246ac7 100644 --- a/clanServices/k3s/default.nix +++ b/clanServices/k3s/default.nix @@ -35,6 +35,8 @@ in perInstance = { instanceName, settings, machine, roles, ... }: { nixosModule = { config, pkgs, ... }: { + environment.systemPackages = with pkgs; [ k9s ]; + clan.core.vars.generators.k3s = { share = false; files = { diff --git a/devShells/flake-module.nix b/devShells/flake-module.nix old mode 100644 new mode 100755 diff --git a/justfile b/justfile old mode 100644 new mode 100755 From f41d661cd39ffdfd9b01c5f1b66b789b1ecaf49a Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 25 Sep 2025 08:27:43 +0000 Subject: [PATCH 2/2] too lazy to think of a message, so enjoy this pointless text. Good luck future me... --- clanServices/k3s/default.nix | 50 +++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/clanServices/k3s/default.nix b/clanServices/k3s/default.nix index ee8f982..c0aa1df 100644 --- a/clanServices/k3s/default.nix +++ b/clanServices/k3s/default.nix @@ -30,12 +30,58 @@ in Temporary option till I figure out something useful ''; }; + + crossplane.resources.composite = mkOption { + type = with types; listOf (either path attrs); + default = []; + example = lib.literalExpression '' + [ + ../manifests/my-composite-resource.yml + { + apiVersion = "v1"; + kind = "CompositeResourceDefinition"; + metadata = { + name = "app-service"; + }; + spec = { + selector = { + "app.kubernetes.io/name" = "MyApp"; + }; + ports = [ + { + name = "name-of-service-port"; + protocol = "TCP"; + port = 80; + targetPort = "http-web-svc"; + } + ]; + }; + } + ]; + ''; + description = '' + Temporary option till I figure out something useful + ''; + }; + + # crossplane.resources.managed = mkOption { + # type = with types; listOf (either path attrs); + # default = []; + # example = lib.literalExpression '' + # [ + # ../manifests/my-managed-resource.yml + # ]; + # ''; + # description = '' + # Temporary option till I figure out something useful + # ''; + # }; }; }; perInstance = { instanceName, settings, machine, roles, ... }: { nixosModule = { config, pkgs, ... }: { - environment.systemPackages = with pkgs; [ k9s ]; + environment.systemPackages = with pkgs; [ k9s linkerd ]; clan.core.vars.generators.k3s = { share = false; @@ -115,6 +161,8 @@ in deploymentStrategy = "RollingUpdate"; }; + + extraDeploy = settings.crossplane.resources.composite; }; }; };