From bc88471e6ab3154e5f060540a87582a18a46e503 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 18 Sep 2025 12:05:31 +0000 Subject: [PATCH] too lazy to think of a message, so enjoy this pointless text. Good luck future me... --- clanServices/k3s/default.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/clanServices/k3s/default.nix b/clanServices/k3s/default.nix index 2c6ebe0..44192b5 100644 --- a/clanServices/k3s/default.nix +++ b/clanServices/k3s/default.nix @@ -16,14 +16,19 @@ in # Server configuration #============================================================================================================== roles.server = { - interface = { lib, ... }: { - options.name = lib.mkOption { - type = lib.types.str; - default = ""; - example = "some-name"; - description = '' - Temporary option till I figure out something useful - ''; + interface = { lib, ... }: + let + inherit (lib) mkOption types toString; + { + options = { + port = mkOption { + type = types.port; + default = 6443; + example = "6443"; + description = '' + Temporary option till I figure out something useful + ''; + }; }; }; @@ -74,6 +79,9 @@ in clusterInit = true; }; }; + + exports.port = port; + exports.address = "https://\${config.networking.fqdn}:${toString port}"; }; }; @@ -124,8 +132,4 @@ in }; }; }; - - perMachine = { config, ... }: { - exports.address = "https://${config.networking.fqdn}:6443"; - }; }