too lazy to think of a message, so enjoy this pointless text. Good luck future me...

This commit is contained in:
Chris Kruining 2025-09-25 08:58:27 +00:00
parent f41d661cd3
commit f27083c014

View file

@ -18,7 +18,7 @@ in
roles.server = { roles.server = {
interface = { lib, ... }: interface = { lib, ... }:
let let
inherit (lib) mkOption types toString; inherit (lib) mkOption mkEnableOption mkIf types toString;
in in
{ {
options = { options = {
@ -31,6 +31,9 @@ in
''; '';
}; };
harbor.enable = mkEnableOption "Enable Harbor - container registry";
crossplane.enable = mkEnableOption "Enable Crossplane - control plane";
crossplane.resources.composite = mkOption { crossplane.resources.composite = mkOption {
type = with types; listOf (either path attrs); type = with types; listOf (either path attrs);
default = []; default = [];
@ -63,24 +66,15 @@ in
Temporary option till I figure out something useful 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, ... }: { perInstance = { instanceName, settings, machine, roles, ... }: {
nixosModule = { config, pkgs, ... }: { nixosModule = { config, pkgs, lib, ... }:
let
inherit (lib) mkOption mkEnableOption mkIf types toString;
in
{
environment.systemPackages = with pkgs; [ k9s linkerd ]; environment.systemPackages = with pkgs; [ k9s linkerd ];
clan.core.vars.generators.k3s = { clan.core.vars.generators.k3s = {
@ -126,7 +120,7 @@ in
clusterInit = true; clusterInit = true;
autoDeployCharts = { autoDeployCharts = {
harbor = { harbor = mkIf settings.harbor.enable {
name = "harbor"; name = "harbor";
repo = "https://helm.goharbor.io"; repo = "https://helm.goharbor.io";
version = "1.14.0"; version = "1.14.0";
@ -147,7 +141,7 @@ in
}; };
}; };
crossplane = { crossplane = mkIf settings.crossplane.enable {
name = "crossplane"; name = "crossplane";
repo = "https://charts.crossplane.io/stable"; repo = "https://charts.crossplane.io/stable";
version = "2.0.2"; version = "2.0.2";