diff --git a/README.md b/README.md new file mode 100644 index 0000000..666c891 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Nix Homelab +This is the config of a nix based homelab server. Currently a work in progress. + +## Clustering with K3s +K3s is a simplified version of Kubernetes. \ No newline at end of file diff --git a/configuration.nix b/configuration.nix index 919e44b..7f39490 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,6 +10,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./homeassistant.nix + ./k3-cluster.nix ]; # Bootloader. @@ -136,7 +137,7 @@ 8123 config.services.home-assistant.config.http.server_port ]; - # networking.firewall.allowedUDPPorts = [ ... ]; + networking.firewall.allowedUDPPorts = []; # Or disable the firewall altogether. # networking.firewall.enable = false; diff --git a/k3-cluster.nix b/k3-cluster.nix new file mode 100644 index 0000000..06bc85b --- /dev/null +++ b/k3-cluster.nix @@ -0,0 +1,27 @@ +{ + # For the first node: + services.k3s = { + enable = true; + role = "server"; + token = ""; + clusterInit = true; + }; + + # All subsequent nodes: + # services.k3s = { + # enable = true; + # role = "server"; # Or "agent" for worker only nodes + # token = "