From 4e8d440a67c49abf9ce782779aadca7d28b5f1f6 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 2 Jan 2024 22:41:05 +0100 Subject: [PATCH] k3s: init --- modules/k3s/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/k3s/default.nix diff --git a/modules/k3s/default.nix b/modules/k3s/default.nix new file mode 100644 index 0000000..ab3058d --- /dev/null +++ b/modules/k3s/default.nix @@ -0,0 +1,17 @@ +{ pkgs, config, lib, ... }: +with lib; +let + cfg = config.eboskma.k3s; +in +{ + options.eboskma.k3s = { enable = mkEnableOption "k3s"; }; + + config = mkIf cfg.enable { + services.k3s = { + enable = true; + extraFlags = "--tls-san=10.0.0.4 --tls-san=100.106.117.132"; + }; + + environment.systemPackages = with pkgs; [ kubectl kubernetes-helm ]; + }; +}