This repository contains a Nix Flake which provides the necessary utilities to
use k0s
inside of a NixOS system.
The implementation is in its early phase. It is possible to use and make work (with a few manual twists) for early inspection.
Both contributions and forks are welcome, also if this should ever reach a state which could be integrated upstream into Nixpkgs then I would happy archive this Flake for it.
nix build .#nixosConfigurations.test.config.system.build.toplevel
Inspect the result in ./result
.
k0s
uses a token to join the cluster. The token has to be placed into
/etc/k0s/k0stoken
(configurable via services.k0s.tokenFile
), otherwise the
service will not start.
After the join the content is not needed anymore an the file can be emptied.
Providing the token has to be done either manually or by your favorite automation tooling.
k0s
is currently included as a binary. It would be better to replicate the build process so that it would be built from sources.
Check out the folder docs
. It contains further notes about thoughts
and internals.
- The
k0s
package definition tool the work from this PR as input: NixOS/nixpkgs#258846
- Packaging request in NixOS - NixOS/nixpkgs#247158
- Pull Request to add the binary
k0s
into Nixpkgs - NixOS/nixpkgs#258846 - Systemd unit handling related PR in
k0s
- k0sproject/k0s#1318