athens/nix/modules/k3s/common.nix

19 lines
353 B
Nix
Raw Normal View History

2025-03-08 17:50:32 -05:00
{ config, ... }:
2025-03-10 23:22:23 -04:00
let
hostname = config.networking.hostName;
hosts = import ../../hosts.nix;
in
2025-03-08 17:50:32 -05:00
{
services.k3s = {
2025-03-10 23:22:23 -04:00
enable = true;
2025-03-08 17:50:32 -05:00
tokenFile = config.sops.secrets.k3s-token.path;
2025-03-10 23:22:23 -04:00
extraFlags = [
"--node-external-ip=${hosts.${hostname}.address}"
];
2025-03-08 17:50:32 -05:00
};
sops.secrets.k3s-token = {
owner = "root";
mode = "0400";
};
}