athens/nix/modules/k3s/common.nix
2025-03-10 23:22:23 -04:00

19 lines
353 B
Nix

{ config, ... }:
let
hostname = config.networking.hostName;
hosts = import ../../hosts.nix;
in
{
services.k3s = {
enable = true;
tokenFile = config.sops.secrets.k3s-token.path;
extraFlags = [
"--node-external-ip=${hosts.${hostname}.address}"
];
};
sops.secrets.k3s-token = {
owner = "root";
mode = "0400";
};
}