Every other nixos-homelab-* repo takes this one as an input and
requires its cluster module -- which bootstraps k3s and
kubetree -- enabled. It also
provides shared services used across those repos: a database, a
dashboard, TLS, and storage.
See the workload macros docs for the custom
resource kinds kubetree.resources accepts, the kubenix docs
for the typed resources and submodules of homelab.kubernetes that replace them, and
the options reference for the full list of module options.
{
inputs = {
...
homelab-shared = {
url = "github:nixos-homelab/shared";
inputs.nixpkgs.follows = "nixpkgs";
};
...
};
}{ inputs, ... }:
{
imports = [
inputs.homelab-shared.nixosModules.cluster
inputs.homelab-shared.nixosModules.postgresql
];
config.homelab.cluster.enable = true;
}- cluster: bootstraps k3s and
kubetree, and provides the sharedhomelab.cluster.*options (pod/service CIDRs, debug tools, backup aggregation) every other module in this ecosystem builds on. - cluster also takes kubenix configuration in
homelab.kubernetes, with theworkloadsubmodule -- see the kubenix docs. - workload-macros: the
WorkloadMacro/DeploymentMacro/etc. resource kinds -- see the workload macros docs. - homepage: the homepage dashboard, with a
per-service
integrationsallow-list. - cert-manager: cert-manager plus a LibDNS ACME webhook, for automated TLS certificates.
- postgresql: a shared PostgreSQL instance with declarative database creation and backups.
- redis: a shared Redis instance with a database-index registry, to keep workloads from colliding on the same DB number.
- nfs-provisioner: a dynamic PersistentVolume provisioner backed by an NFS export.
- smb: Samba file sharing, with per-user passwords set up through
setup-secrets. - k8sss: deploys k8sss for
SSH-key-based
kubectlaccess.