✨ add k3s
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
_:
|
||||
let
|
||||
hosts = import ../../hosts.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
|
||||
services.k3s = {
|
||||
role = "agent";
|
||||
serverAddr = "https://100.111.208.75:6443";
|
||||
serverAddr = "https://${hosts.plato.address}:6443";
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,15 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
hostname = config.networking.hostName;
|
||||
hosts = import ../../hosts.nix;
|
||||
in
|
||||
{
|
||||
services.k3s = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
tokenFile = config.sops.secrets.k3s-token.path;
|
||||
extraFlags = [
|
||||
"--node-external-ip=${hosts.${hostname}.address}"
|
||||
];
|
||||
};
|
||||
sops.secrets.k3s-token = {
|
||||
owner = "root";
|
||||
|
Reference in New Issue
Block a user